Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.filter((i) => i.definition.type === Helpers.Implements)
.map((i) => (i.inputs ? i.inputs.map((n) => n.definition.type) : []))
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,
},
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,
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,
};
acceptsInputs: (d, defs) =>
Utils.dataForTypes(defs, [Helpers.Implements]).map(Utils.nodeDefinitionToAcceptedEditorNodeDefinition),
help: help.implements,
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,
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,