这是indexloc提供的服务,不要输入任何密码
Skip to content

REST: queries should be validated after metadata changes #7497

@lorenzo

Description

@lorenzo

The REST API feature is a time-saver, it really helps put a working API together from a working GraphQL query.

I have noticed on occasion that when changing the underlying schema or metadata, no validation happens for the queries backing the REST api, which leads to errors.

For instance, we have a remote GraphQL schema that exposes some mutations, such as orderCancel. We exposed this query over REST:

mutation CancelOrder($orderRef: String!) {
  orderCancel(args: {ref: $orderRef}) {
    status
  }
}

We now deleted the remote schema, but there is not indicated in the metadata that this query still exists and that is now invalid!

I think REST queries should be validated against new metadata changes.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions