Skip to content

Commit 11f0411

Browse files
authored
Update graphql.md
Extended example of `schema:download` with passing a secret password. Important: `--header` has to be put before `--endpoint` if it has to work with the custom output file
1 parent 32e6fdc commit 11f0411

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

addons/graphql.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ Now you can create a script in your **package.json** file that looks something l
341341
```typescript
342342
{
343343
"scripts": {
344-
"schema": "apollo schema:download --endpoint=http://some-endpoint.dev graphql-schema.json && apollo codegen:generate --localSchemaFile=graphql-schema.json --target=typescript --includes=src/overmind/**/*.ts --tagName=gql --no-addTypename --globalTypesFile=src/overmind/graphql-global-types.ts graphql-types"
344+
"schema": "apollo schema:download --header='X-Hasura-Admin-Secret: password' --endpoint=http://some-endpoint.dev graphql-schema.json && apollo codegen:generate --localSchemaFile=graphql-schema.json --target=typescript --includes=src/overmind/**/*.ts --tagName=gql --no-addTypename --globalTypesFile=src/overmind/graphql-global-types.ts graphql-types"
345345
}
346346
}
347347
```

0 commit comments

Comments
 (0)