directus / directus

The Modern Data Stack 🐰 — Directus is an instant REST+GraphQL API and intuitive no-code data collaboration app for any SQL database.

Home Page:https://directus.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

that1matt opened this issue · comments

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.
  4. 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