mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-07-12 09:12:18 +03:00
Optionally match on operation name
This commit is contained in:
parent
587af8f608
commit
b30baeabc8
|
@ -135,7 +135,9 @@
|
|||
// Run a regex against the query to determine the operation type (query, mutation, subscription).
|
||||
var operationRegex = new RegExp(
|
||||
// Look for lines that start with an operation keyword, ignoring whitespace.
|
||||
"^\\s*(query|mutation|subscription)\\s+" +
|
||||
"^\\s*(query|mutation|subscription)\\s*" +
|
||||
// The operation keyword should be followed by whitespace and the operationName in the GraphQL parameters (if available).
|
||||
(graphQLParams.operationName ? ("\\s+" + graphQLParams.operationName) : "") +
|
||||
// The line should eventually encounter an opening curly brace.
|
||||
"[^\\{]*\\{",
|
||||
// Enable multiline matching.
|
||||
|
|
Loading…
Reference in New Issue
Block a user