Project

General

Profile

Actions

Feature #358

open

Configurable literal coercion

Added by Eugen Wissner 11 months ago.

Status:
New
Priority:
Normal
Category:
-
Target version:
-
% Done:

0%


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: Atom PDF