Skip to content

Not possible to create code first GraphQL resolver without mutation or subscription. #251

@Bilchuck

Description

@Bilchuck

I'm submitting a...


[ ] Regression 
[X] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current behavior

I try to create code first GraphQL resolver but it fails with message:
TypeError: Cannot read property 'getFields' of undefined

Expected behavior

I want to be able to create a code first GraphQL resolvers without mutation and subscriber. Only with a query.

Minimal reproduction of the problem with instructions

git clone https://github.com/nestjs/nest/tree/master/sample/12-graphql-apollo

Comment out Mutation and Subscription from the resolver.

Start application.

Environment


Nest version: 6.2.0

 
For Tooling issues:
- Node version: v10.9.0  

Others:

The code fails here: https://github.com/nestjs/graphql/commit/775becaa198ede54fca88a4646a37aabdc2445d7#diff-80fdafbe4271cf8fbb25f5506d9a3e8eR117

#250

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions