How to use the apollo-server-adonis.graphqlAdonis function in apollo-server-adonis

To help you get started, we’ve selected a few apollo-server-adonis 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 HigoRibeiro / adonis-gql / src / Server / index.js View on Github external
handle (context, options = {}) {
    if (!this.$schema) {
      throw new Error('Schema has not been defined')
    }

    if (options.mocks) {
      addMockFunctionsToSchema({
        schema: this.$schema,
        preserveResolvers: false
      })
    }

    return graphqlAdonis({
      context,
      schema: this.$schema
    })(context)
  }
github RomainLanz / adonis-graphql / src / Server / index.js View on Github external
handle (context, options = {}) {
    Object.assign(this.$options, options)

    return graphqlAdonis({
      context,
      schema: this.$schema,
      formatError: this.$handleError,
      ...this.$options,
    })(context)
  }

apollo-server-adonis

Production-ready Node.js GraphQL server for Adonis Framework

MIT
Latest version published 6 years ago

Package Health Score

67 / 100
Full package analysis