Skip to content

Warning when use GraphQLNonNull or GraphQLList #2338

Closed
@amjedomar

Description

@amjedomar

The official graphql-js document refers that GraphQLNonNull is a class so if I want to use it I have to instantiate it and then pass a valid graphql type to it

But when I do that the IDE that I use (WebStorm) show me a warning about that:

Interface can not be instantiated

GraphQLNonNull

However, the warning disappears when I use it without instantiating it (without writing new keyword before it)

GraphQLNonNull2

This problem is also happening with GraphQLList

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