Error Running sample GraphQL query on Books with Authors
See original GitHub issueHello, I was re-testing the Cosmos Starter doc GraphQL queries (dab updated to latest 0.2.52 version) based on https://github.com/Azure/data-api-builder/blob/main/docs/getting-started/getting-started-azure-cosmos-db.md#graphql-operations-on-entity-relationships and found that while simple GraphQL query on single entity worked fine, query on multiple entity/types from that Doc example (Books and Authors) failed with Type error - See below.
{
"errors": [
{
"message": "The field `authors` does not exist on the type `Book`.",
"locations": [
{
"line": 7,
"column": 7
}
],
"path": [
"books",
"items"
],
"extensions": {
"type": "Book",
"field": "authors",
"responseName": "authors",
"specifiedBy": "http://spec.graphql.org/October2021/#sec-Field-Selections-on-Objects-Interfaces-and-Unions-Types"
}
}
]
}
Issue Analytics
- State:
- Created a year ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
GraphQL query best practices
The first query is named GetBooks . The second query is anonymous. You should define a name for every GraphQL operation in your...
Read more >GraphQL request error - Unknown argument 'slug'
I am running into this GraphQL error while compiling: error GraphQL Error There was an error while compiling your site's GraphQL queries.
Read more >Failed to validate the query: `Field does not exist on ...
Attempting to create a book yields a similar error. My Cell for FindBooks looks like this: export const QUERY = gql` query FindBooks...
Read more >Understanding N + 1 Graphql Query Problem
In the example server, the client is able to request a list of books or list of authors without any other information. In...
Read more >How to Write GraphQL Queries
For example, GitHub's search query takes a searchType argument that is an enum with the possible values of ISSUE , REPOSITORY or USER...
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 FreeTop 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
Top GitHub Comments
@sajeetharan, could you please fix the query specified in the doc: https://github.com/Azure/data-api-builder/blob/main/docs/getting-started/getting-started-azure-cosmos-db.md#graphql-operations-on-entity-relationships
@Aniruddh25 That results in type error, Looks like this is a bug, let me check with @mbhaskar