FailedToConvertPartOfTheQuery: Failed to convert to graphql query: i
See original GitHub issueDescribe the bug
When executing a Query or Mutation with variables, the project won’t compile with the error FailedToConvertPartOfTheQuery
How to Reproduce
Create new project with the graphql schema url: https://api-mumbai.lens.dev/graphql/:
Project init:
dotnet new console -o QLClient
cd QLClient
dotnet new tool-manifest
dotnet tool install ZeroQL.CLI
dotnet add package ZeroQL
dotnet zeroql schema pull -u https://api-mumbai.lens.dev/graphql/
dotnet zeroql generate --schema ./schema.graphql --namespace TestServer.Client --client-name TestServerGraphQLClient --output Generated/GraphQL.g.cs
Program.cs:
using TestServer.Client;
var httpClient = new HttpClient();
httpClient.BaseAddress = new Uri("https://api-mumbai.lens.dev/graphql/");
var client = new TestServerGraphQLClient(httpClient);
var request = new ChallengeRequest { Address = "0x1c2eAdbB291709D3252610C431A6Ee355191E545" };
client.Query(request, static (i, o) => o.Challenge(i, result => new { result.Text }));
Expected behavior The project should compile and run the queries.
Screenshots
Environment (please complete the following information):
- IDE: VS for Windows AND VS for Mac (reporoduced on both)
- .Net Version: 6.0
Issue Analytics
- State:
- Created 4 months ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Error handling - Apollo GraphQL Docs
A client sent the hash of a query string to execute via automatic persisted queries, but the server has disabled APQ. OPERATION_RESOLUTION_FAILURE. The...
Read more >I have a graphQL query and wanted to convert it ...
The query shows issues with @Key as Your GraphQL Schema is using "@key" directive from an older version of the GraphQL Transformer ....
Read more >Cannot convert graphql.common.request.graphqlrequest to ...
Hi, I am new to GraphQL and I have created the below API to query some data from the internal webpage. I am...
Read more >Full Stack Error Handling with GraphQL and Apollo
If networkError is present in your response, it means your entire query was rejected, and therefore no data was returned. For example, the ......
Read more >Error trying to resolve a query field · Issue #239
Hi, I started using graphiQL + graphql-dotnet with mysql database and EF. I add a new query object "ruoli" in to the container, ......
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
There is no need for second
static
.I think I have to add a custom error message for such cases to avoid future misunderstanding,