Skip to content

Custom Scalars input serialization in variables #253

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 19, 2021

Conversation

leszekhanusz
Copy link
Collaborator

New feature which implements Custom Scalars serialization in variable_values.

For this feature to work:

  • a schema is needed
  • the scalars implementation should be added as a GraphQLScalarType in the schema
  • the execute or subscribe methods (sync or async) should be called with serialize_variables=True

This function allows us to update a schema from a file or from introspection
with custom scalars implementations
@codecov-commenter
Copy link

Codecov Report

Merging #253 (1047885) into master (d5e3e6d) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #253   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           16        19    +3     
  Lines         1335      1404   +69     
=========================================
+ Hits          1335      1404   +69     
Impacted Files Coverage Δ
gql/client.py 100.00% <100.00%> (ø)
gql/utilities/__init__.py 100.00% <100.00%> (ø)
gql/utilities/update_schema_scalars.py 100.00% <100.00%> (ø)
gql/variable_values.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d5e3e6d...1047885. Read the comment docs.

@leszekhanusz leszekhanusz requested a review from Cito November 13, 2021 13:11
@leszekhanusz leszekhanusz merged commit 37f1917 into graphql-python:master Nov 19, 2021
@leszekhanusz leszekhanusz deleted the feature_custom_types branch March 12, 2022 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: support for custom json serialization DSL - Datetime argument serialization failing
2 participants