Error fetching schema from GraphiQL
# support
c
Hi there, I just tried visiting https://graphiql.medplum.com to stub out some GraphQL responses and I'm getting consistent 403 "Forbidden" responses when the GraphiQL client attempts to fetch the schema. I can fetch data, just not the schema. Thanks for your help here!
r
Yes, Medplum does support GraphQL schema introspection. However, it's important to note that this feature is put behind a feature flag for security and performance reasons. The Medplum production servers disable GraphQL schema queries to reduce the risk of service interruption. To use GraphQL schema introspection, you need to enable it in the server configuration. This was introduced in the release version 2.0.22 as per this GitHub PR. https://github.com/medplum/medplum/pull/2198 For local development, you can use GraphiQL and you need a copy of the schema "introspection query" response in the public/schema directory. You can either copy the publicly hosted schema or regenerate the schema from the current GraphQL model. Here are the steps to regenerate the schema:
c
Ty @reshma !
150 Views