-
Notifications
You must be signed in to change notification settings - Fork 349
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
Naming Convention Transform Breaks Union Type Query #1592
Comments
It's specifically this transform:
|
Could you share more details and a reproduction if possible? |
This is my mesh config sources:
- name: DirectusAcademy
handler:
graphql:
endpoint: ${DIRECTUS_HOST}
schemaHeaders:
Authorization: Bearer ${DIRECTUS_API_TOKEN}
operationHeaders:
Authorization: Bearer ${DIRECTUS_API_TOKEN}
batch: false
transforms:
# Global
- resolversComposition:
- resolver: 'Query.*'
composer: ./src/middleware/api-token-guard.js
- resolver: 'Mutation.*'
composer: ./src/middleware/api-token-guard.js
- namingConvention:
typeNames: pascalCase
enumValues: upperCase
fieldNames: camelCase
serve:
port: 5000 We are hooking into Directus which has "many to any" relational support e.g. Lesson has "steps", and that step could be a "Lesson Slide", "Lesson Video", etc object. Previous to the transforms the query was: {
items {
course(limit:10) {
id
title
description
lessons {
title
sub_title
can_preview
description
steps {
step_title
can_preview
item {
... on lesson_slide {
content
status
image_url
}
... on lesson_video {
video_url
}
}
}
}
}
}
} My theory is that it's still looking for the snake case type name for Here's a repo I set up with instructions on how to replicate this! https://github.com/ddcollins/mesh-directus-replication |
Adding the naming convention transform:
Results in the following error:
When trying to run the following query:
This query works fine when the naming convention transform is removed.
The query also works fine if I remove:
The query is through my graphql handler.
Dependencies:
The text was updated successfully, but these errors were encountered: