How to use the gatsby/graphql.GraphQLString function in gatsby

To help you get started, we’ve selected a few gatsby 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 medialab / website / site / schema.js View on Github external
const GraphQLTypes = require('gatsby/graphql');
const sharp = require('sharp');
const path = require('path');
const _ = require('lodash');

const GraphQLTranslatedString = new GraphQLTypes.GraphQLObjectType({
  name: 'TranslatedString',
  fields: {
    en: {
      type: GraphQLTypes.GraphQLString
    },
    fr: {
      type: GraphQLTypes.GraphQLString
    }
  }
});

exports.graphQLSchemaAdditionForSettings = function(schemas, getNode) {

  const relationTypes = {};

  for (const k in schemas) {
    relationTypes[k] = new GraphQLTypes.GraphQLObjectType({
      name: _.capitalize(k),
      fields: {
        ...schemas[k],
        id: {
          type: GraphQLTypes.GraphQLString
        }
github medialab / website / site / schema.js View on Github external
const GraphQLTypes = require('gatsby/graphql');
const sharp = require('sharp');
const path = require('path');
const _ = require('lodash');

const GraphQLTranslatedString = new GraphQLTypes.GraphQLObjectType({
  name: 'TranslatedString',
  fields: {
    en: {
      type: GraphQLTypes.GraphQLString
    },
    fr: {
      type: GraphQLTypes.GraphQLString
    }
  }
});

exports.graphQLSchemaAdditionForSettings = function(schemas, getNode) {

  const relationTypes = {};

  for (const k in schemas) {
    relationTypes[k] = new GraphQLTypes.GraphQLObjectType({
      name: _.capitalize(k),
      fields: {
        ...schemas[k],