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

If parse_literal is not present try fallbacking to parse_value(ast.value) #26

Closed
rafalp opened this issue Sep 5, 2018 · 1 comment · Fixed by #158
Closed

If parse_literal is not present try fallbacking to parse_value(ast.value) #26

rafalp opened this issue Sep 5, 2018 · 1 comment · Fixed by #158
Assignees
Labels
enhancement New feature or request roadmap Feature that we want to have included
Milestone

Comments

@rafalp
Copy link
Contributor

rafalp commented Sep 5, 2018

Following idea was brought up in discussion for #24:

Maybe we could default to calling parse_value with ast.value when only one function is provided?

This requires further study. IntValue, StringValue and friends are obvious to deal with, but but complex types like ListValue may require some extra unpacking magic.

Still, if it is possible to pull off, it could be an excellent convenience for developers creating custom scalars, saving the need for potentially maintaining two very simiiar implementations, one doing isinstance(value, basestr) and other isinstance(value, StringValue).

@rafalp rafalp added the decision needed Sounds like good idea, but will need closer scrutiny for final decision. label Sep 5, 2018
@rafalp rafalp mentioned this issue Sep 5, 2018
2 tasks
@rafalp
Copy link
Contributor Author

rafalp commented Sep 5, 2018

Another idea: for simplicity reasons we could only unwrap basic types, and still error on anything else, forcing the dev to handle more complex types (if they wish to do so).

@rafalp rafalp added this to the 0.2 milestone Sep 28, 2018
@rafalp rafalp removed this from the 0.2 milestone Oct 17, 2018
@rafalp rafalp added help wanted Extra attention is needed and removed decision needed Sounds like good idea, but will need closer scrutiny for final decision. labels Jan 8, 2019
@rafalp rafalp added this to the 0.3.0 milestone Jan 11, 2019
@rafalp rafalp added the roadmap Feature that we want to have included label Jan 17, 2019
@rafalp rafalp self-assigned this Mar 8, 2019
@rafalp rafalp removed this from the 0.3.0 milestone Apr 8, 2019
@rafalp rafalp added this to the 0.4 milestone May 7, 2019
@rafalp rafalp added enhancement New feature or request and removed help wanted Extra attention is needed labels May 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request roadmap Feature that we want to have included
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant