You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use GraphQL Mesh to convert an existing RESTful API into a GraphQL schema(Simplified version). I have generated the following schema, but when I run the query provided below, I receive an error in the response.
{
"data": {
"brandConfig": {
"data": [
{
"brandBaseConfigVo": null,
"id": 31,
"brandId": "122"
}
]
}
},
"errors": [
{
"message": "Abstract type \"BrandBaseConfigVo\" must resolve to an Object type at runtime for field \"BrandConfigVo.brandBaseConfigVo\". Either the \"BrandBaseConfigVo\" type should provide a \"resolveType\" function or each possible type should provide an \"isTypeOf\" function.",
"path": [
"brandConfig",
"data",
0,
"brandBaseConfigVo"
]
}
]
}
Expected behavior
I expect the query to execute without any errors and return the requested data.
Steps to reproduce(Because it involves production projects and it is not convenient to provide reproducible examples, please refer to the following steps)
Generate the provided schema using GraphQL Mesh.
Execute the provided query using the generated schema.
Observe the error in the response.
Possible solution
As the error suggests, the abstract type "BrandBaseConfigVo" must resolve to an Object type at runtime for the field "BrandConfigVo.brandBaseConfigVo". To fix this issue, either the "BrandBaseConfigVo" type should provide a "resolveType" function, or each possible type should provide an "isTypeOf" function.
Please let me know if you need any additional information or if there is a workaround available for this issue. Thank you for your assistance.
The text was updated successfully, but these errors were encountered:
Sorry for the late response! But we need a full reproduction with an example OpenAPI to reproduce it on our end.
If you still have the issue with the latest version, let us know so we can reopen this issue.
Description
I am trying to use GraphQL Mesh to convert an existing RESTful API into a GraphQL schema(Simplified version). I have generated the following schema, but when I run the query provided below, I receive an error in the response.
Schema(Simplified version)
Query
Error
Expected behavior
I expect the query to execute without any errors and return the requested data.
Steps to reproduce(Because it involves production projects and it is not convenient to provide reproducible examples, please refer to the following steps)
Possible solution
As the error suggests, the abstract type "BrandBaseConfigVo" must resolve to an Object type at runtime for the field "BrandConfigVo.brandBaseConfigVo". To fix this issue, either the "BrandBaseConfigVo" type should provide a "resolveType" function, or each possible type should provide an "isTypeOf" function.
Please let me know if you need any additional information or if there is a workaround available for this issue. Thank you for your assistance.
The text was updated successfully, but these errors were encountered: