-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
issue: quick fixIssues that could be fixed quickly, with small- to medium-sized PRsIssues that could be fixed quickly, with small- to medium-sized PRspr: updated contentPRs updating existing documentation contentPRs updating existing documentation contentseverity: lowIf the issue only affects a very niche base of users and an easily implemented workaround can solveIf the issue only affects a very niche base of users and an easily implemented workaround can solvesource: Dev DocsPRs/issues targeting the Developer DocsPRs/issues targeting the Developer Docstarget: v3Documentation PRs/issues targeting content from docs-v3.strapi.io (v3 branch)Documentation PRs/issues targeting content from docs-v3.strapi.io (v3 branch)
Description
Bug report
Describe the bug
Note Internal TID164
When using dynamic zones, different components cannot have the same field name with different types (or with enums, different values). GraphQL throws an error like:
Steps to reproduce the behavior
- Create a model with a dynamic zone
- Create two components each with an enum called
color
(doesn't matter what the values are) - Create a record in the model and set both components and their values
- Install GraphQL plugin
- Try to query data
- See Error (example below)
Expected behavior
Error doesn't happen
Screenshots
Code snippets
GraphQL Query:
query {
tests {
string
content {
__typename
... on ComponentContentContainer {
color
}
... on ComponentContentImage {
color
}
}
}
}
System
- Node.js version: v12.19.0
- NPM version: v6.14.8
- Strapi version: v3.5.4
- Database: SQLite
- Operating system: Linux Mint 20.1 (Ubuntu 20.04.1)
Additional context
Sample repo:
testGQLDZ.zip
Metadata
Metadata
Assignees
Labels
issue: quick fixIssues that could be fixed quickly, with small- to medium-sized PRsIssues that could be fixed quickly, with small- to medium-sized PRspr: updated contentPRs updating existing documentation contentPRs updating existing documentation contentseverity: lowIf the issue only affects a very niche base of users and an easily implemented workaround can solveIf the issue only affects a very niche base of users and an easily implemented workaround can solvesource: Dev DocsPRs/issues targeting the Developer DocsPRs/issues targeting the Developer Docstarget: v3Documentation PRs/issues targeting content from docs-v3.strapi.io (v3 branch)Documentation PRs/issues targeting content from docs-v3.strapi.io (v3 branch)