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

SDL generated code now contains gql import statement #670

Closed
thedavidprice opened this issue Jun 9, 2020 · 2 comments · Fixed by #884
Closed

SDL generated code now contains gql import statement #670

thedavidprice opened this issue Jun 9, 2020 · 2 comments · Fixed by #884

Comments

@thedavidprice
Copy link
Contributor

@cannikin @peterp

From the work on #515, the SDL generated code now includes import gql from 'graphql-tag', which is a change. Functionally this does not conflict with the auto-import or cause issues. But it is a (small) deviation from the Tutorial code.

I’m assuming this is the case because it's required for the generated TS code to work, correct?

  • if so, should we update the Tutorial? (example section "Saving Data")
  • if not, should we remove from source template?
@cannikin
Copy link
Member

cannikin commented Jun 9, 2020

Hmm yeah we purposely made an effort to remove this import (like with 'react') to make everyone's lives easier.

If it's required, it must only be required if you generate TS templates, correct? So if you generate JS can we remove it somehow?

If it's not required let's definitely remove from the template altogether!

@peterp
Copy link
Contributor

peterp commented Jun 9, 2020

We can take it out, I'll add an ambient declaration that makes this work.

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.

3 participants