directus / directus

The Modern Data Stack 🐰 — Directus is an instant REST+GraphQL API and intuitive no-code data collaboration app for any SQL database.
https://directus.io
Other
25.77k stars 3.59k forks source link

Adding incorrect value to `one_allowed_collections` relations through schema endpoint breaks graphql endpoint without any visible errors. #22520

Closed that1matt closed 4 days ago

that1matt commented 2 weeks ago

Describe the Bug

A member on my team accidentally added an incorrect value to a M2A relations value (through the schame apply) in the one_allowed_collections field where they used a - instead of _. This caused our graphql to return a 500 error for all queries being made. There was no error message outside of INTERNAL_SERVER_ERROR.

A more descriptive error message would have been helpful.

To Reproduce

  1. Create a collection with a M2A relationship.
  2. Pull down schema through API
  3. Change field one_allowed_collections value to include a non-existent collection in the schema.
  4. Push up schema changes.
  5. Try and make any graphql query, or even fetch schema, and get 500 error.

Directus Version

v10.11.0

Hosting Strategy

Directus Cloud

Database

PostgresQL 13.8