-
-
Notifications
You must be signed in to change notification settings - Fork 459
Closed
webonyx/graphql-php
#1038Labels
bugAn error within LighthouseAn error within Lighthouse
Description
Describe the bug
It returns 500 server error, if you are sending an unknown type in the orderByDirective.
Expected behavior/Solution
It should send some kind of GraphQL incorrect format response.
Steps to reproduce
- Create a query which is using the
orderBy
directive - Define your query on the client side. E.g.:
query(
$page: Int!
$first: Int!
$orderBy: [UNKNOWN_TYPE!]
) {
...
- Send query
Output/Logs
Click to expand
[2021-09-15 14:49:55] local.ERROR: Lighthouse failed while trying to load a type: OrdersOrderByOrderByClause
Make sure the type is present in your schema definition.
{"userId":1,"exception":"[object] (Nuwave\\Lighthouse\\Exceptions\\DefinitionException(code: 0): Lighthouse failed while trying to load a type: UNKNOWN_TYPE
Make sure the type is present in your schema definition.
Lighthouse Version
5.23
Metadata
Metadata
Assignees
Labels
bugAn error within LighthouseAn error within Lighthouse