-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error while using most of the GraphQL Schema #24
Comments
Yeap, I forgot about the built-in ID scalar. I will have a look at it |
@kiranchandran Checkout 3.3.0-preview.2 It should generate proper GraphQL classes. |
Hi @byme8 Great, Thanks. The issue with the ID is fixed, but it still in error state with the TimeSpan data type in GraphQL. You can use the same example https://workshop.chillicream.com/graphql?sdl to re-create the issue |
Are you sure that you are using 3.3.0-preview.2 in ZeroQL CLI and the csproj itself? It has a fix for TimeSpan too. |
I don't see issues with https://workshop.chillicream.com/graphql?sdl. |
Hi @byme8 Yes I use the version 3.3.0-preview.2. |
Hi @byme8, I forgot about that config file. I though updating the nugget package is enough. I just updated the sample with another schema and I get some build error for some custom types. Thanks in Advance |
Do you know how the |
I mean, on the backend |
In your new schema, there is an interface |
Uploaded version 3.4.0. It can generate proper classes from your new schema. I have tried to test as much as possible, but your schema looks like broken or changed manually. Still, I managed to generate code that at least was able to compile and pass test cases that I managed to replicate with the HotChocolate server. |
Hi @byme8 Thanks for following up and fixing this in the package. In fact I was looking for this for a project which is not active right now. But I appreciate you took time to get this fixed. Thanks |
Describe the bug
When using most of the schema available online the tool is failing to generate the client code without compilation error.
The type or namespace name 'ID' could not be found (are you missing a using directive or an assembly reference?)
How to Reproduce
Use the below schema
curl https://workshop.chillicream.com/graphql?sdl > schema.graphql
Then generate the code using below command
dotnet zeroql generate --schema ./schema.graphql --namespace TestServer.Client --client-name TestServerGraphQLClient --output Generated/GraphQL.g.cs
Expected behavior
The code should be generated without any compilation errors
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: