How to use the graphql-zeus.Helpers.Implements function in graphql-zeus

To help you get started, we’ve selected a few graphql-zeus examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github graphql-editor / graphql-editor / src / NodesToTree / index.ts View on Github external
            .filter((i) => i.definition.type === Helpers.Implements)
            .map((i) => (i.inputs ? i.inputs.map((n) => n.definition.type) : []))
github graphql-editor / graphql-editor / src / TreeToNodes / index.ts View on Github external
static createInterfaces = (
    interfaces: string[],
    rootNode: Node,
    nodeDefinitions: EditorNodeDefinition[],
    links: Link[],
    nodes: Array>,
  ) => {
    const createdNode = TreeToNodes.connectAndCreate(
      {
        name: Helpers.Implements,
        type: {
          name: Helpers.Implements,
        },
      },
      rootNode,
      links,
      nodeDefinitions,
      nodes,
    );
    interfaces.forEach((i) => {
      TreeToNodes.connectAndCreate(
        {
          type: {
            name: i,
          },
          name: i,
github graphql-editor / graphql-editor / src / Graph / definitions / HelperDefintions.ts View on Github external
},
      type: Helpers.Comment,
      root: true,
      data: {
        type: Helpers.Comment,
      },
      help: help.implements,
    };
    const implementsObject: EditorNodeDefinition = {
      node: {
        notEditable: true,
        name: undefined,
      },
      type: Helpers.Implements,
      data: {
        type: Helpers.Implements,
        for: [TypeDefinition.ObjectTypeDefinition],
      },
      acceptsInputs: (d, defs) =>
        Utils.dataForTypes(defs, [Helpers.Implements]).map(Utils.nodeDefinitionToAcceptedEditorNodeDefinition),
      help: help.implements,
    };
    const directivesObject: EditorNodeDefinition = {
      node: {
        notEditable: true,
        name: undefined,
      },
      type: Helpers.Directives,
      data: {
        type: Helpers.Directives,
        for: [
          TypeSystemDefinition.FieldDefinition,
github graphql-editor / graphql-editor / src / Graph / definitions / Implements.ts View on Github external
import { Helpers, Instances } from 'graphql-zeus';
import { EditorNodeDefinition } from '../../Models';
import { Utils } from './Utils';

export const ImplementsInstance: Partial & Pick = {
  options: Utils.ArrayNonNullOptions,
  data: {
    type: Instances.Implement,
    for: [Helpers.Implements],
  },
  acceptsInputs: undefined,
  node: {
    inputs: null,
    outputs: [],
    notEditable: true,
    name: undefined,
  },
  instances: undefined,
};
github graphql-editor / graphql-editor / src / Graph / definitions / HelperDefintions.ts View on Github external
acceptsInputs: (d, defs) =>
        Utils.dataForTypes(defs, [Helpers.Implements]).map(Utils.nodeDefinitionToAcceptedEditorNodeDefinition),
      help: help.implements,
github graphql-editor / graphql-editor / src / TreeToNodes / index.ts View on Github external
static createInterfaces = (
    interfaces: string[],
    rootNode: Node,
    nodeDefinitions: EditorNodeDefinition[],
    links: Link[],
    nodes: Array>,
  ) => {
    const createdNode = TreeToNodes.connectAndCreate(
      {
        name: Helpers.Implements,
        type: {
          name: Helpers.Implements,
        },
      },
      rootNode,
      links,
      nodeDefinitions,
      nodes,
    );
    interfaces.forEach((i) => {
      TreeToNodes.connectAndCreate(
        {
          type: {
            name: i,
          },
          name: i,
          data: {
            type: Instances.Implement,
github graphql-editor / graphql-editor / src / Graph / definitions / HelperDefintions.ts View on Github external
node: {
        name: undefined,
      },
      type: Helpers.Comment,
      root: true,
      data: {
        type: Helpers.Comment,
      },
      help: help.implements,
    };
    const implementsObject: EditorNodeDefinition = {
      node: {
        notEditable: true,
        name: undefined,
      },
      type: Helpers.Implements,
      data: {
        type: Helpers.Implements,
        for: [TypeDefinition.ObjectTypeDefinition],
      },
      acceptsInputs: (d, defs) =>
        Utils.dataForTypes(defs, [Helpers.Implements]).map(Utils.nodeDefinitionToAcceptedEditorNodeDefinition),
      help: help.implements,
    };
    const directivesObject: EditorNodeDefinition = {
      node: {
        notEditable: true,
        name: undefined,
      },
      type: Helpers.Directives,
      data: {
        type: Helpers.Directives,