Skip to content

Highlight mistakes when using makeExtendSchemaPlugin #671

Open
@benjie

Description

@benjie

Feature description

Make it more obvious to users of makeExtendSchemaPlugin when they've done something wrong; for example referencing a type that doesn't exist, or using the wrong keyword.

Motivating example

Currently you can write code such as:

extend type DeleteProductionRunInput {
  force: BOOLEAN
}

Or

extend type ThisTypeDoesNotExist {
  foo: String
}

and PostGraphile will process it, queue it up to extend that type when it's defined and thus never actually do anything since the type never is built in the first place. This is due to the way that PostGraphile's hooks work. We should also register a finalize hook that checks that all the rules that were added had at least one match - if not, we should warn aboout that rule.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    🌳 Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions