@envelop/core
Advanced tools
Comparing version
@@ -1232,5 +1232,11 @@ 'use strict'; | ||
const rootQueryType = ctx.getSchema().getQueryType(); | ||
const rootMutationType = ctx.getSchema().getMutationType(); | ||
const rootSubscriptionType = ctx.getSchema().getSubscriptionType(); | ||
return { | ||
Field(field) { | ||
if (ctx.getParentType() === rootQueryType && !field.name.value.startsWith('__')) { | ||
const parentType = ctx.getParentType(); | ||
const isQuery = parentType === rootQueryType; | ||
const isMutation = parentType === rootMutationType; | ||
const isSubscription = parentType === rootSubscriptionType; | ||
if ((isQuery && !field.name.value.startsWith('__')) || isMutation || isSubscription) { | ||
onNonIntrospectionField(); | ||
@@ -1237,0 +1243,0 @@ return graphql.BREAK; |
{ | ||
"name": "@envelop/core", | ||
"version": "2.3.0", | ||
"version": "2.3.1", | ||
"sideEffects": false, | ||
@@ -5,0 +5,0 @@ "peerDependencies": { |
Sorry, the diff of this file is not supported yet
110301
0.7%2738
0.44%