Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
connectionFromArray,
connectionFromPromisedArray,
cursorForObjectInConnection,
// Object Identification
nodeDefinitions,
toGlobalId,
fromGlobalId,
globalIdField,
pluralIdentifyingRootField,
// Mutations
mutationWithClientMutationId,
} from "graphql-relay";
// Connections
// connectionArgs returns the arguments that fields should provide when they return a connection type that supports bidirectional pagination.
connectionArgs.first = 10;
connectionArgs.after = "a";
connectionArgs.before = "b";
connectionArgs.last = 10;
// forwardConnectionArgs returns the arguments that fields should provide when they return a connection type that only supports forward pagination.
forwardConnectionArgs.after = "a";
forwardConnectionArgs.first = 10;
// backwardConnectionArgs returns the arguments that fields should provide when they return a connection type that only supports backward pagination.
backwardConnectionArgs.before = "b";
backwardConnectionArgs.last = 10;
// connectionDefinitions returns a connectionType and its associated edgeType, given a node type.
const resolve: GraphQLFieldResolver = (source, args, context, info) => {
info.fieldName = "f";
};
const fields: GraphQLFieldConfigMap = {};
let t: GraphQLObjectType;
let e: GraphQLObjectType;
const def = connectionDefinitions({