C# Schema Types - Generated query types is missing arguments #8688
Unanswered
amitkumarrayofficeacc
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Using the website: https://the-guild.dev/graphql/codegen, I am trying to generate the Types.cs file for the sample graphQL file: schema.graphql under C# Schema Types option.
For the Query type, we can see the user query has arguments (id : ID!). This argument is completely missed in the output file Types.cs. Here the argument is a scalar field and it can be an object as well or multiple arguments can be required for a query type. .
schema Types.cs contains
type Query {
me: User!
user(id: ID!): User
allUsers: [User]
search(term: String!): [SearchResult!]!
myChats: [Chat!]!
}
Generated Types.cs contains:
namespace GraphQLCodeGen {
public class Types {
In case, where argument of a query type is another input type, a class of that input type gets generated. However, the information that the input class is linked to which query type is getting lost. Thereby, the generated schema cannot be considered as a source of truth.
Please let me know for more info.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions