apollo-tooling icon indicating copy to clipboard operation
apollo-tooling copied to clipboard

apollo-language-server: allow code generation from typescript generic graphql tag

Open hugo082 opened this issue 4 years ago • 3 comments

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.

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

hugo082 avatar Jul 26 '21 08:07 hugo082

@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/

apollo-cla avatar Jul 26 '21 08:07 apollo-cla

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

hugo082 avatar Aug 05 '21 13:08 hugo082

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

hugo082 avatar Aug 27 '21 09:08 hugo082