[Bug]: Using filter on multi-level nested objects causes runtime error (GraphQL, CosmosDB)
See original GitHub issueWhat happened?
Simplified version of the schema looks like:
type EmployeeAggregate @model {
id: ID
Payload: Payload
}
type Payload {
Id: ID
Jobs: [Job]
}
type Job {
Fte: Int
}
Config looks like:
"entities": {
"EmployeeAggregate": {
"source": "employeeAggregates_v2",
"permissions": [
{
"role": "anonymous",
"actions": [
"*"
]
}
]
},
"Payload": {
"source": "employeeAggregates_v2",
"permissions": [
{
"role": "anonymous",
"actions": [
"*"
]
}
]
},
"Job": {
"source": "employeeAggregates_v2",
"graphql": {
"type": {
"singular": "Job",
"plural": "Jobs"
}
}
}
}
Query looks like:
employeeAggregates(first: 10, filter: {Payload: {Jobs: {Fte: {eq: 1}}}}) {
items {
Payload {
Id
}
}
}
}
Error looks like:
{
"errors": [
{
"message": "GraphQL type doesn't match any entity name or singular type in the runtime config.",
"extensions": {
"code": "BadRequest"
}
}
]
}
Note Filtering on first-level nested object (e.g. “Payload”) works. However, filtering second-level nested objects (e.g. “Jobs”) fails.
Version
0.7.6
What database are you using?
CosmosDB NoSQL
What hosting model are you using?
Static Web Apps (SWA)
Which API approach are you accessing DAB through?
GraphQL
Relevant log output
{
"errors": [
{
"message": "GraphQL type doesn't match any entity name or singular type in the runtime config.",
"extensions": {
"code": "BadRequest"
}
}
]
}
Code of Conduct
- I agree to follow this project’s Code of Conduct
Issue Analytics
- State:
- Created a month ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Unable to queries in nested object in CosmosDB entry
Is there a way to query a nested object within a document in CosmosDB when there are multiple nested items with same id:...
Read more >CRAN Packages By Name
Available CRAN Packages By Name ; ACSWR, A Companion Package for the Book "A Course in Statistics with R" ; act, Aligned Corpus...
Read more >An Atypical ASP.NET Core 6 Design Patterns Guide
A SOLID adventure into architectural principles and design patterns using ... NET SDK versus runtime • 9 ... Using multiple configurator objects •...
Read more >sitemap~www~guided-projects.xml
https://www.coursera.org/projects/how-to-create-a-marketing-analytics-dashboard-using-hubspot ... https://www.coursera.org/projects/qa-java-bugs-and-errors ...
Read more >Simple Index
564bff00ff-strawberry-graphql ... add-methods-and-properties-to-existing-object ... amazon-product-scraper-with-python · amazon-review-scraper
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@Isayaa This limitation extends to queries as well. We will assess and provide you with an update regarding the ETA for the fix.
@tarazou9 thanks for your answer. Some feedback and question: