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

Generate args prepending context object name #554

Merged
merged 2 commits into from
Aug 14, 2020

Conversation

galales
Copy link
Contributor

@galales galales commented Aug 13, 2020

This should fix #367 and fix #552

I had to pass the ObjectTypeDefinition to the writeArguments function to concatenate the required name.
In order to avoid having classes with "Mutation", "Query" and "Subscription" prefix, objects definitions have been checked against reservedType function.
When calling writeField, checks are done also on schema definition and union types. I don't think it is required in this case, but correct my if I'm wrong.

Let me know if you think additional changes are required

Copy link
Owner

@ghostdogpr ghostdogpr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks very good! 2 issues fixed for the price of 1 😄

@ghostdogpr ghostdogpr merged commit 2401c21 into ghostdogpr:master Aug 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants