Skip to content

Graphql: Do not try to convert Dates (considered an object)#14520

Merged
rijkvanzanten merged 1 commit intomainfrom
graphql/fix-date-dynamic-variable
Jul 19, 2022
Merged

Graphql: Do not try to convert Dates (considered an object)#14520
rijkvanzanten merged 1 commit intomainfrom
graphql/fix-date-dynamic-variable

Conversation

@joselcvarela
Copy link
Copy Markdown
Member

Description

When using date dynamic variables in Graphql, the server returns with errors telling the field is not a date (1).
The most interesting part of this issue is after the first issue occurred the next Graphql request always hang and if we try to make the request again it crash with 500 Internal Server Error (2).

The Internal Server Error has the following message:
'select "directus_users"."id", "directus_users"."role", "directus_roles"."admin_access", "directus_roles"."app_access" from "directus_users" left join "directus_roles" on "directus_users"."role" = "directus_roles"."id" where "directus_users"."token" = $1 and "status" = $2 limit $3 - invalid message format'

I am not sure what causes the (2) issue, but this PR only fixes (1) which prevents (2) from happening on this context.

Fixes #14480
Fixes https://github.com/directus/cloud/issues/500

Type of Change

  • Bugfix
  • Improvement
  • New Feature
  • Refactor / codestyle updates
  • Other, please describe:

Requirements Checklist

  • New / updated tests are included
  • All tests are passing locally
  • Performed a self-review of the submitted code

If adding a new feature:

  • Documentation was added/updated

@rijkvanzanten rijkvanzanten added this to the Next Release milestone Jul 19, 2022
@rijkvanzanten rijkvanzanten self-assigned this Jul 19, 2022
@rijkvanzanten rijkvanzanten merged commit f7a8c36 into main Jul 19, 2022
@rijkvanzanten rijkvanzanten deleted the graphql/fix-date-dynamic-variable branch July 19, 2022 21:54
qborisb pushed a commit to qdentity/directus that referenced this pull request Jul 22, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Insight - Adding list panels with date filters containing dynamic variables will crash the API

2 participants