Skip to content

[graphql-language-service-interface] add suggestions to spread fragments on Field #880

@pieh

Description

@pieh

Right now fragment spread suggestions are shown only when you start with ... fragment spread operator.

I'd like to propose adding fragment spread suggestion earlier (on Field, SelectionSet etc), so we it's much easier for new GraphQL users to discover them.

Basic idea is to have it look something like:
Screenshot 2019-05-26 at 15 30 07

Another suggestion from me would be to consider adding inline fragments to union types as well:
Screenshot 2019-05-26 at 15 30 16
(unions and inline fragments are quite common pain points for Gatsby users that are new to GraphQL)

This would require just slight refactoring to reuse already existing code and I'm happy to submit pull request if this change would be welcome here.

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