graphql-introspection
A project feature flag for GraphQL schema introspection. Ovok accepts and stores it, but turning it on does not enable introspection today: introspection is governed by a platform-wide setting, not by this flag.
| Type | Project feature |
Value in features | graphql-introspection |
| Change with | PATCH /v1/projects/me/features (replaces the whole list) |
| Who can change it | Project admin. Any practitioner can read the list. |
| On for new projects | No |
| Effect on ordinary GraphQL queries | None. They work whether the flag is on or off. |
| Effect on introspection queries | None. |
What works
Ordinary queries need no feature:
curl --request POST \
--url 'https://api.sandbox.ovok.com/fhir/R4/$graphql' \
--header "Authorization: Bearer ${OVOK_TOKEN}" \
--header 'Content-Type: application/json' \
--data '{"query":"{ PatientList(_count: 1) { id } }"}'
Whether an introspection query (one that asks for __schema or __type) is answered depends on a platform-wide setting, not on this flag. In the sandbox it is answered whether or not the flag is on:
curl --request POST \
--url 'https://api.sandbox.ovok.com/fhir/R4/$graphql' \
--header "Authorization: Bearer ${OVOK_TOKEN}" \
--header 'Content-Type: application/json' \
--data '{"query":"{ __schema { queryType { name } } }"}'
| Response path | Example | Meaning |
|---|---|---|
data.__schema.queryType.name | QueryType | Name of the root query type returned by introspection. |
An environment whose platform setting disables introspection refuses these queries with 403, and adding this flag does not change that.
Gotchas
- You do not need the flag for GraphiQL or a code generator. Introspection works in the sandbox without it. If a tool gets
403elsewhere, the flag is not the cause and setting it will not fix it. - A stored flag is not a promise. The flag is accepted and stored, but nothing reads it for GraphQL today.
- Use the published references for schema. The Ovok API references list the resources, elements and search parameters you can query.
- Introspection is expensive. It is for development tools; do not call it from production code.