GraphQL

microgateway.airlock.com/v1alpha1


GraphQL defines a policy for enforcing a GraphQL schema.

apiVersion: microgateway.airlock.com/v1alpha1
kind: GraphQL
metadata:
  name: graphql-example
spec:
  settings:
    threatHandlingMode: Block
    allowMutations: true
    allowIntrospection: false
    schema:
      source:
        configMapRef:
          name: graphql-schema
apiVersion: microgateway.airlock.com/v1alpha1
kind: GraphQL
metadata:
  name: default
spec: 
  settings: 
    threatHandlingMode: Block
    allowMutations: true
    allowIntrospection: true

GraphQL

Field Description Type Required Default Allowed Values
metadata defines the resource’s metadata ObjectMeta yes
spec defines the desired GraphQL schema enforcement configuration. object no

GraphQL.spec

Field Description Type Required Default Allowed Values
settings defines the settings to configure GraphQL. object no

GraphQL.spec.settings

Field Description Type Required Default Allowed Values
allowIntrospection specifies if the introspection system is exposed. bool no true true, false
allowMutations specifies if mutations are allowed. bool no true true, false
schema specifies the GraphQL schema. object no
threatHandlingMode specifies how threats should be handled. enum no Block Block, LogOnly

GraphQL.spec.settings.schema

Field Description Type Required Default Allowed Values
source specifies the GraphQL (October 2021 Edition) schema to be enforced. object yes configMapRef{}

GraphQL.spec.settings.schema.source

Field Description Type Required Default Allowed Values
configMapRef references the configmap by its name containing the well-known key schema.graphql. Use the data field for plaintext or the binaryData for compressed data. Supported compression formats are zstd, gzip or zip.
Note: If the provided GraphQL schema is invalid (e.g., due to syntax errors), the Airlock Microgateway Engine will log an error, GraphQL validation will always fail, and requests will be blocked.
object no

GraphQL.spec.settings.schema.source.configMapRef

Field Description Type Required Default Allowed Values
name of the resource string yes