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

Make suffix of generated query response types customizable #2116

Merged
merged 5 commits into from Jul 8, 2019

Conversation

jlkiri
Copy link
Contributor

@jlkiri jlkiri commented Jul 6, 2019

This PR addresses the following issue: #2110

I made changes to base-documents-visitor that allow users to specify (via config) a custom suffix of generated operation result type names (like PlayerQuery or PlayerMutation types). Adding a suffix Result to e.g. PlayerQuery type would generate PlayerQueryResult.

To add a suffix (which type is string), you have to use operationResultSuffix in config.yml.

@dotansimha
Copy link
Owner

Hi @jlkiri !
Thank you.
I think you should allow other base plugins to know about this new flag as well.
The typescript-react-apollo (based on base-client-side-visitor) is using the generated type name, so it might cause a mismatch if it won't append this suffix as well.

@jlkiri
Copy link
Contributor Author

jlkiri commented Jul 6, 2019

As far as I could understand, base-client-side-visitor is the only one I had to additionally change. I also added an annotation.

@dotansimha dotansimha merged commit 87bdfb8 into dotansimha:master Jul 8, 2019
@dotansimha
Copy link
Owner

Looks great, thanks @jlkiri !

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.

None yet

2 participants