How to use the @graphback/codegen-schema.SchemaGenerator function in @graphback/codegen-schema

To help you get started, we’ve selected a few @graphback/codegen-schema 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 aerogear / graphback / packages / graphback / src / GraphQLBackendCreator.ts View on Github external
public async createRuntime(db: GraphbackDataProvider, pubSub: PubSub): Promise {
    const backend: RuntimeResolversDefinition = {
      schema: "",
      resolvers: {}
    };

    const schemaGenerator = new SchemaGenerator(this.inputContext)
    backend.schema = schemaGenerator.generate()
    const defaultProvider = new CRUDService(db, pubSub);
    const resolverGenerator = new LayeredRuntimeResolverGenerator(this.inputContext, defaultProvider)
    backend.resolvers = resolverGenerator.generate()

    return backend;
  }
github aerogear / graphback / packages / graphback / src / GraphQLBackendCreator.ts View on Github external
public async createBackend(resolverOptions: ResolverGeneratorOptions): Promise {
    const backend: IGraphQLBackend = {};
    const schemaGenerator = new SchemaGenerator(this.inputContext, tsSchemaFormatter)
    backend.schema = schemaGenerator.generate()

    backend.resolvers = createResolvers(this.inputContext, resolverOptions);

    return backend;
  }

@graphback/codegen-schema

GraphQL-Code-Generator compatibile schema generator

Apache-2.0
Latest version published 4 years ago

Package Health Score

45 / 100
Full package analysis

Similar packages