@cran/lib.gql.core
Version:
GQL Core Functionality
35 lines (30 loc) • 1.43 kB
text/typescript
import { DirectiveLocation, type GraphQLDirective } from "graphql";
export const isInternal: Readonly<Record<DirectiveLocation, boolean>> = {
// 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: DirectiveLocation ) {
return isInternal[location];
}
export function isInternalDirective ( directive: GraphQLDirective ) {
return directive.locations.every(isInternalLocation);
}