Skip to content

Conversation

@hugo082
Copy link

@hugo082 hugo082 commented Jul 26, 2021

Allow using Typescript code generation with a generic graph tag.

Example:

const myQuery = () =>  graphql<TResponse>`query MyQuery {
   user(username: "Joe") {
     id
     name
   }
 }`

The regex is tested here. 2 tests don't pass but as they are not valid Typescript syntax it is not a problem.

  • Make sure all of the significant new logic is covered by tests
  • Rebase your changes on master so that they can be merged easily
  • Make sure all tests and linter rules pass

@apollo-cla
Copy link

@hugo082: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Apollo Contributor License Agreement here: https://contribute.apollographql.com/

@hugo082 hugo082 force-pushed the fix/codegen-generic-graphql-tag branch from 1d93a20 to a8f6949 Compare July 28, 2021 16:37
Allow to use generic graph tag like: graphql<TResponse>`{ myQuery }`
@hugo082 hugo082 force-pushed the fix/codegen-generic-graphql-tag branch from a8f6949 to 1bfd0f6 Compare July 28, 2021 16:40
@hugo082 hugo082 marked this pull request as ready for review July 29, 2021 14:09
@hugo082
Copy link
Author

hugo082 commented Aug 5, 2021

@JakeDawkins what is the process to ask for a review/release? Maybe I need to post on a community channel?

@hugo082
Copy link
Author

hugo082 commented Aug 27, 2021

@hwillson can you have a look at this PR? 🙏

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.

2 participants