Skip to content
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

add_resolve_functions_to_schema should support Scalars parse_value and parse_literal #13

Closed
rafalp opened this issue Aug 7, 2018 · 0 comments · Fixed by #24
Closed
Assignees
Labels
help wanted Extra attention is needed roadmap Feature that we want to have included
Milestone

Comments

@rafalp
Copy link
Contributor

rafalp commented Aug 7, 2018

Currently Ariadne Scalar support is limited to serializing python types to JSON before returning them to client, but we also want to support using custom scalars for input.

Our add_resolve_functions_to_scalar utility could support following use-cases:

Code below results in one-way only scalar:

  • type_defs = {'Scalar': {'serialize': callable}}

And this code results in two-way scalar:

  • type_defs = {'Scalar': {'serialize': callable, 'parse_value': callable, 'parse_literal': callable}} - explicit syntax for two-directional scalar.
@rafalp rafalp added the roadmap Feature that we want to have included label Aug 7, 2018
@rafalp rafalp added this to the 0.1 milestone Aug 10, 2018
@rafalp rafalp added the help wanted Extra attention is needed label Aug 23, 2018
@rafalp rafalp self-assigned this Aug 28, 2018
@rafalp rafalp mentioned this issue Aug 28, 2018
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed roadmap Feature that we want to have included
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant