We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Example use case:
Next.js app where the API routes can call the graphql API as admins vs the frontend that can call the API as authenticated users.
Example config from graphql-code-generator config which allows a similar behaviour:
module.exports = { generates: { './types/codegen/index.ts': { schema: [ { [`https${process.env.NEXT_PUBLIC_API_URL}`]: { headers: { 'X-Hasura-Admin-Secret': XXXXXX, 'X-Hasura-Role': 'User', }, }, }, ], documents: [ './pages/**/*.tsx', './components/**/*.tsx', './utils/**/*.tsx', ], }, './types/codegen/admin-generated.ts': { schema: [ { [`https${process.env.NEXT_PUBLIC_API_URL}`]: { headers: { 'X-Hasura-Admin-Secret': XXXXXX, 'X-Hasura-Role': 'Admin', }, }, }, ], documents: ['./pages/api/**/*.ts'], }, }, };
┆Issue is synchronized with this Jira Task by Unito
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Example use case:
Next.js app where the API routes can call the graphql API as admins vs the frontend that can call the API as authenticated users.
Example config from graphql-code-generator config which allows a similar behaviour:
┆Issue is synchronized with this Jira Task by Unito
The text was updated successfully, but these errors were encountered: