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

support addTypename as an option. #71

Open
kgdev opened this issue Apr 7, 2017 · 4 comments · May be fixed by #265
Open

support addTypename as an option. #71

kgdev opened this issue Apr 7, 2017 · 4 comments · May be fixed by #265

Comments

@kgdev
Copy link

kgdev commented Apr 7, 2017

No description provided.

@jnwng
Copy link
Contributor

jnwng commented Apr 11, 2017

@kgdev just to qualify, can you describe some intended behavior? do you want to be able to automatically add __typename to every selection set when using graphql-tag?

@kgdev
Copy link
Author

kgdev commented Apr 12, 2017

yes. at least with a option like import 'some.graphql?typename=true'. And we can enable this by default.

@kasbah
Copy link

kasbah commented Jul 8, 2018

Taking a queue from existing options I guess it should be implemented to be used like this?

import gql, { enableTypenameInsertion } from 'graphql-tag'

enableTypenameInsertion()

@dmhalejr
Copy link

dmhalejr commented Jul 8, 2019

👋 I'd like to take this on. My approach was just to use the apollo-utils library to do the heavy lifting and add typename appropriately

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants