Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GraphQL Error with Translations of Model #11693

Closed
3 tasks done
wodka opened this issue Feb 17, 2022 · 2 comments
Closed
3 tasks done

GraphQL Error with Translations of Model #11693

wodka opened this issue Feb 17, 2022 · 2 comments

Comments

@wodka
Copy link
Contributor

wodka commented Feb 17, 2022

Preflight Checklist

Describe the Bug

The moment I make the Translations of a Model public so I can query then via GraphQL an error appears.

image
image
image
image

TypeError[snippet_translations.languages_code]: Definition object should contain 'type' property: Object({ type: undefined, resolve: [function resolve] })

To Reproduce

Start a new Instance with 9.5.1 and add a translation to one Model.

-> Mark Model as public and it's translation and try to query it.

Errors Shown

19:50:11 🚨 TypeError[snippet_translations.languages_code]: Definition object should contain 'type' property: Object({ type: undefined, resolve: [function resolve] })
Error: TypeError[snippet_translations.languages_code]: Definition object should contain 'type' property: Object({ type: undefined, resolve: [function resolve] })
at TypeMapper.convertOutputFieldConfig (/directus/node_modules/graphql-compose/lib/TypeMapper.js:230:27)
at ObjectTypeComposer.setField (/directus/node_modules/graphql-compose/lib/ObjectTypeComposer.js:162:46)
at /directus/node_modules/graphql-compose/lib/ObjectTypeComposer.js:168:18
at Array.forEach ()
at ObjectTypeComposer.addFields (/directus/node_modules/graphql-compose/lib/ObjectTypeComposer.js:167:32)
at getTypes (/directus/node_modules/directus/dist/services/graphql.js:339:105)
at getReadableTypes (/directus/node_modules/directus/dist/services/graphql.js:398:62)
at GraphQLService.getSchema (/directus/node_modules/directus/dist/services/graphql.js:134:41)
at GraphQLService.execute (/directus/node_modules/directus/dist/services/graphql.js:91:29)
at /directus/node_modules/directus/dist/controllers/graphql.js:27:40
19:50:11 ✨ request errored POST 500 /graphql 17ms

What version of Directus are you using?

9.5.1

What version of Node.js are you using?

16.13.0

What database are you using?

CockroachDB

What browser are you using?

Chrome / Safari / Postman / Firefox

What operating system are you using?

Docker / OSX / Linux

How are you deploying Directus?

Docker

@wodka wodka changed the title GraphQL Error wi GraphQL Error with Translations of Model Feb 17, 2022
@joselcvarela
Copy link
Member

joselcvarela commented Feb 21, 2022

Hello,
I am just testing that here and found no problem. Here's the demonstration:

Screen.Recording.2022-02-21.at.06.02.08.mov

You might have some issue with those collections.
Can you try if this also happens on a fresh install?

@rijkvanzanten
Copy link
Member

Thank you for taking the time to submit this! Unfortunately, our team was not been able to reproduce it based on the information provided. Therefore, we will close this ticket for now, but will happily re-open it if new details are provided that allow us to reliably replicate the problem.

As a reminder:

  • Provide as much detail as possible in the issue description
  • Video screen captures and clear steps are very helpful
  • A full SQL dump is the fastest way for us to test/resolve (can be sent privately)
  • Make sure you are on the latest version of Directus
  • Did you try turning it off and on again?

This is an automated response.

@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
None yet
Projects
None yet
Development

No branches or pull requests

3 participants