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

Transform GraphQL query schema into a helper #2

Open
VitorLuizC opened this issue Jul 28, 2018 · 0 comments
Open

Transform GraphQL query schema into a helper #2

VitorLuizC opened this issue Jul 28, 2018 · 0 comments

Comments

@VitorLuizC
Copy link

VitorLuizC commented Jul 28, 2018

const Query = `
type Query {
${ commentQueries }
${ postQueries }
${ userQueries }
}
`

Transform query.ts schema into a helper. This improves readability and scales even with big amount of queries.

export const Query = createQuerySchema(
  commentQueries,
  postQueries,
  userQueries
);
@VitorLuizC VitorLuizC changed the title Transform GraphQL schema into a helper Transform GraphQL query schema into a helper Jul 28, 2018
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

1 participant