Update disable-introspection.mdx (#6040)

Co-authored-by: Arda TANRIKULU <ardatanrikulu@gmail.com>
This commit is contained in:
Christian Fritsch 2024-11-29 14:16:16 +01:00 committed by GitHub
parent c33aad09ea
commit 73342267e8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -38,7 +38,9 @@ import { defineConfig } from '@graphql-hive/gateway'
export const gatewayConfig = defineConfig({
disableIntrospection: {
isDisabled: request => request.headers.get('x-allow-introspection') !== 'secret-access-key'
disableIf: ({ context }) => {
return context.request.headers.get('x-allow-introspection') !== 'secret-access-key'
}
}
})
```