gql-generator icon indicating copy to clipboard operation
gql-generator copied to clipboard

Export typescript files

Open Hasan-git opened this issue 6 years ago • 1 comments

Could you provide a way to export the queries in typescript files ? Like =>


import gql from 'graphql-tag';

export const ADD_TASK = gql`
mutation createTask($description: String!, $title: String!, $status: TaskStatus){
    createTask(description: $description, title: $title, status: $status){
      id
      title
      description
      version
      status
    }
  }
`;

Hasan-git avatar Jun 26 '19 09:06 Hasan-git

If you have access to a schema you can generate types from it using https://graphql-code-generator.com/. Is this what you need?

burtyish avatar Dec 09 '19 20:12 burtyish