@cran/lib.gql.core
Version:
GQL Core Functionality
31 lines (30 loc) • 1.15 kB
JavaScript
import { DirectiveLocation } from "graphql";
export const isInternal = {
// Request Definitions
[]: false,
[]: false,
[]: false,
[]: false,
[]: false,
[]: false,
[]: false,
[]: false,
// Type System Definitions
[]: true,
[]: true,
[]: true,
[]: true,
[]: true,
[]: true,
[]: true,
[]: true,
[]: true,
[]: true,
[]: true,
};
export function isInternalLocation(location) {
return isInternal[location];
}
export function isInternalDirective(directive) {
return directive.locations.every(isInternalLocation);
}