Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Shane32 committed Oct 31, 2024
1 parent fc8d6cd commit 3817ecf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Ui.GraphiQL/Internal/graphiql.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@
function isSubscription(operationName, documentAST) {
if (!documentAST.definitions || !documentAST.definitions.length || !documentAST.definitions.filter) return false;
const definitions = documentAST.definitions.filter(function (def) { return def.kind === 'OperationDefinition'; });
let definitions = documentAST.definitions.filter(function (def) { return def.kind === 'OperationDefinition'; });
if (operationName) definitions = definitions.filter(function (def) { return def.name && def.name.value === operationName; });
if (definitions.length === 0) return false;
return definitions[0].operation === 'subscription';
Expand Down

0 comments on commit 3817ecf

Please sign in to comment.