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

Export typescript files #21

Open
Hasan-git opened this issue Jun 26, 2019 · 1 comment
Open

Export typescript files #21

Hasan-git opened this issue Jun 26, 2019 · 1 comment

Comments

@Hasan-git
Copy link

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
    }
  }
`;
@burtyish
Copy link

burtyish commented Dec 9, 2019

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

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

No branches or pull requests

2 participants