How to use the graphql-zeus.Value.StringValue 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 / templates / ValueTemplate.ts View on Github external
static resolve(f: ParserField) {
    let returnedValue = `${f.name}`;
    if (f.data && f.data.type) {
      if (f.data.type === Value.EnumValue) {
        returnedValue = `${f.type.name}`;
      }
      if (f.data.type === Value.StringValue) {
        returnedValue = `"${f.name}"`;
      }
      if (f.data.type === Value.ObjectValue) {
        returnedValue = `{${(f.args || []).map(TemplateUtils.resolverForConnection)}}`;
      }
    }
    return returnedValue;
  }
}
github graphql-editor / graphql-editor / src / Graph / definitions / TypeDefintions.ts View on Github external
                  .filter((d) => d.data && d.data.type === Value.StringValue)
                  .map(Utils.nodeDefinitionToAcceptedEditorNodeDefinition),
github graphql-editor / graphql-editor / src / Graph / index.ts View on Github external
        (n) => n.name.length === 0 && n.definition.data && (n.definition.data as any).type !== Value.StringValue,
      );
github graphql-editor / graphql-editor / src / Graph / definitions / BuiltIn.ts View on Github external
      .filter((d) => d.data && d.data.type === Value.StringValue)
      .map(Utils.nodeDefinitionToAcceptedEditorNodeDefinition);
github graphql-editor / graphql-editor / src / Graph / definitions / ScalarDefintions.ts View on Github external
acceptsInputs: (d, defs) =>
            defs
              .filter((d) => d.data && d.data.type === valueType)
              .concat(
                Utils.dataForTypes(defs, [ValueDefinition.InputValueDefinition]).filter(
                  (d) => d.data && d.data.type !== Value.ObjectValue,
                ),
              )
              .map(Utils.nodeDefinitionToAcceptedEditorNodeDefinition),
        },
      ];
      return scalarDefinitions;
    };
    const BooleanDefintions = generateScalarDefinitions(ScalarTypes.Boolean, Value.BooleanValue, help.Boolean);
    const FloatDefintions = generateScalarDefinitions(ScalarTypes.Float, Value.FloatValue, help.Float);
    const IDDefintions = generateScalarDefinitions(ScalarTypes.ID, Value.StringValue, help.ID);
    const IntDefinitions = generateScalarDefinitions(ScalarTypes.Int, Value.IntValue, help.Int);
    const StringDefinitions = generateScalarDefinitions(ScalarTypes.String, Value.StringValue, help.String);
    return [
      ...BooleanDefintions,
      ...FloatDefintions,
      ...[IDDefintions[0], IDDefintions[2]],
      ...IntDefinitions,
      ...StringDefinitions,
    ];
  }
}
github graphql-editor / graphql-editor / src / Graph / definitions / TypeDefintions.ts View on Github external
              .filter((d) => d.data && d.data.type === Value.StringValue)
              .map(Utils.nodeDefinitionToAcceptedEditorNodeDefinition),
github graphql-editor / graphql-editor / src / Graph / definitions / ScalarDefintions.ts View on Github external
.filter((d) => d.data && d.data.type === valueType)
              .concat(
                Utils.dataForTypes(defs, [ValueDefinition.InputValueDefinition]).filter(
                  (d) => d.data && d.data.type !== Value.ObjectValue,
                ),
              )
              .map(Utils.nodeDefinitionToAcceptedEditorNodeDefinition),
        },
      ];
      return scalarDefinitions;
    };
    const BooleanDefintions = generateScalarDefinitions(ScalarTypes.Boolean, Value.BooleanValue, help.Boolean);
    const FloatDefintions = generateScalarDefinitions(ScalarTypes.Float, Value.FloatValue, help.Float);
    const IDDefintions = generateScalarDefinitions(ScalarTypes.ID, Value.StringValue, help.ID);
    const IntDefinitions = generateScalarDefinitions(ScalarTypes.Int, Value.IntValue, help.Int);
    const StringDefinitions = generateScalarDefinitions(ScalarTypes.String, Value.StringValue, help.String);
    return [
      ...BooleanDefintions,
      ...FloatDefintions,
      ...[IDDefintions[0], IDDefintions[2]],
      ...IntDefinitions,
      ...StringDefinitions,
    ];
  }
}