How to use the gridsome/graphql.GraphQLSchema function in gridsome

To help you get started, we’ve selected a few gridsome 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 gridsome / gridsome / packages / source-graphql / transforms.js View on Github external
name: query.name,
      fields: {
        [this.fieldName]: {
          type: nestedType,
          resolve: (parent, args, context, info) => {
            return {}
          }
        }
      }
    })
    const typeMap = schema.getTypeMap()
    const allTypes = Object.keys(typeMap)
      .filter(name => name !== query.name)
      .map(key => typeMap[key])

    return new GraphQLSchema({
      query: newQuery,
      types: allTypes
    })
  }
}

gridsome

A JAMstack framework for building blazing fast websites with Vue.js

MIT
Latest version published 4 years ago

Package Health Score

53 / 100
Full package analysis