GraphQL CORS preflight
/api/graphql/{path}
const url = 'https://example.com/api/graphql/example';const options = {method: 'OPTIONS', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request OPTIONS \ --url https://example.com/api/graphql/example \ --header 'Authorization: Bearer <token>'Handles CORS preflight requests for the GraphQL proxy.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”path
required
GraphQL backend path
string
Responses
Section titled “Responses”CORS headers