Skip to content
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

No upper-case fields #69

Open
chelliwell opened this issue Sep 10, 2019 · 2 comments
Open

No upper-case fields #69

chelliwell opened this issue Sep 10, 2019 · 2 comments
Milestone

Comments

@chelliwell
Copy link
Contributor

The 'parsing' of query classes etc cannot retain uppercase letters in the names e.g.

public class Query
{
   public CharacterOrPerson Hero { get; set; }
}
...

becomes

{"query":"query{hero{name friends{name}}}"}

not

{"query":"Query{Hero{Name Friends{Name}}}"}

Can this be solved?

@sahb1239
Copy link
Owner

sahb1239 commented Sep 10, 2019

Hello,

It's possible to chance the GraphQL field name using an attribute. For example:

[GraphQLFieldName("Name")] 
public string Name { get; set;}

Alternavively you can override the method GetPropertyField in GraphQLFieldBuilder. The automatic lowercasing of GraphQL name could be optional (using some options) in the future. I Will look into that.

@chelliwell
Copy link
Contributor Author

Thanks - that should give me a route to a solution with the current version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants