handleGraphQLRequest() — supabase Function Reference
Architecture documentation for the handleGraphQLRequest() function in route.ts from the supabase codebase.
Entity Profile
Dependency Diagram
graph TD 9f23b9c2_5895_763f_0113_465855239c31["handleGraphQLRequest()"] 9d7ff13f_efdf_f6b5_75c4_c0fbedc42b47["handleRequest()"] 9d7ff13f_efdf_f6b5_75c4_c0fbedc42b47 -->|calls| 9f23b9c2_5895_763f_0113_465855239c31 ed0c8815_1ef9_ebdd_5c03_dac356ae4187["parseGraphQLRequestPayload()"] 9f23b9c2_5895_763f_0113_465855239c31 -->|calls| ed0c8815_1ef9_ebdd_5c03_dac356ae4187 87d3c8b4_1926_050c_c177_ae099c77a929["validateGraphQLRequest()"] 9f23b9c2_5895_763f_0113_465855239c31 -->|calls| 87d3c8b4_1926_050c_c177_ae099c77a929 47f1fb98_99d8_02f2_c6fb_d505e40bcee9["isDevGraphiQL()"] 9f23b9c2_5895_763f_0113_465855239c31 -->|calls| 47f1fb98_99d8_02f2_c6fb_d505e40bcee9 45f64da6_d949_22b4_f6f8_853a312ea9ea["getResponseHeaders()"] 9f23b9c2_5895_763f_0113_465855239c31 -->|calls| 45f64da6_d949_22b4_f6f8_853a312ea9ea style 9f23b9c2_5895_763f_0113_465855239c31 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/docs/app/api/graphql/route.ts lines 111–146
async function handleGraphQLRequest(request: Request): Promise<NextResponse> {
const { method } = request
const isGetRequest = method === 'GET'
const { query, variables, operationName } = await parseGraphQLRequestPayload(request)
const validationErrors = validateGraphQLRequest(query, {
isDevGraphiQL: isDevGraphiQL(request),
isGetRequest,
operationName,
})
if (validationErrors.length > 0) {
return NextResponse.json(
{
errors: validationErrors.map((error) => ({
message: error.message,
locations: error.locations,
path: error.path,
})),
},
{
headers: getResponseHeaders(request, isGetRequest),
}
)
}
const result = await graphql({
schema: rootGraphQLSchema,
contextValue: { request },
source: query,
variableValues: variables,
operationName,
})
return NextResponse.json(result, {
headers: getResponseHeaders(request, isGetRequest),
})
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does handleGraphQLRequest() do?
handleGraphQLRequest() is a function in the supabase codebase.
What does handleGraphQLRequest() call?
handleGraphQLRequest() calls 4 function(s): getResponseHeaders, isDevGraphiQL, parseGraphQLRequestPayload, validateGraphQLRequest.
What calls handleGraphQLRequest()?
handleGraphQLRequest() is called by 1 function(s): handleRequest.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free