Project

General

Profile

Actions

Feature #35

open

Configurable literal coercion

Feature #35: Configurable literal coercion

Added by Eugen Wissner about 8 hours ago.

Status:
New
Priority:
Normal
Assignee:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

coerceInputLiteral default scalars. There is now a way to add custom serialization and custom variable coercing, but coercing the literals isn't extendable.

The outcome of this issues should be the possibility to define custom scalar types.

  1. Rename coerceInputLiteral into coerceLiteral
  2. ScalarType should probably have an additional constructor argument which saves the function Value -> Maybe Value which performs the coercion.
  3. Move hard-coded coercion to the function defined in 2.
  4. Update the documentation for coerceVariableValue and serialize - they should probably take a bit more responsibility if the built-in and custom scalars are going to be handled equally.

No data to display

Actions

Also available in: PDF Atom