Skip to content

Generate graphql operations (code first) #679

Open
@radarsu

Description

@radarsu

Current behavior and motivation

We can generate schema.graphql which is great.
Although in order to generate Angular sdk library to better communicate with NestJS all of the code-generator tools I've found are much like https://github.com/dotansimha/graphql-code-generator - they require operations graphql schema files which unfortunatelly have to be created manually, i.e.:

query someQuery {
    someQuery {
        result
    }
}

That leads to redundancy, errors and slower development process.

Expected behavior

Add functionality to generate optional operations.graphql file with graphql queries and mutations instead of inputs and types (which are in schema.graphql).

GraphQLModule.forRoot({
    ...
    autoSchemaFile: `schema.graphql`,
    // That would solve all the world's problems.
    autoOperationsSchemaFile: `operations.graphql`,
    ...
}),

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions