node_modules/@graphql-tools/utils/index.cjs.js
/**
 * Determines if a fragment is applicable to the given type.
 */
Determines if a fragment is applicable to the given type.
Determines if a fragment is applicable to the given type .
function doesFragmentConditionMatch(exeContext, fragment, type) {
    const typeConditionNode = fragment.typeCondition;
    if (!typeConditionNode) {
        return true;
    }
    const conditionalType = graphql.typeFromAST(exeContext.schema, typeConditionNode);
    if (conditionalType === type) {
        return true;
    }
    if (graphql.isAbstractType(conditionalType)) {
        return exeContext.schema.isPossibleType(conditionalType, type);
    }
    return false;
}
function doesFragmentConditionMatch ( exeContext , fragment , type ) { const typeConditionNode = fragment . typeCondition ; if ( ! typeConditionNode ) { return true ; } const conditionalType = graphql . typeFromAST ( exeContext . schema , typeConditionNode ) ; if ( conditionalType === type ) { return true ; } if ( graphql . isAbstractType ( conditionalType ) ) { return exeContext . schema . isPossibleType ( conditionalType , type ) ; } return false ; }
Determines if a fragment is applicable to the given type.
Determines if a fragment is applicable to the given type .