Closed bawahakim closed 1 year ago
Somehow figured it out: I have to set the name
parameter to null, and not add WithParameter
. This seems to add the query as is without using variables, and works as expected.
var containsFilterQuery = new GraphQlQueryParameter<string>(-->null<--, defaultValue: "Something");
var nameStringFilter = new StringFilter();
nameStringFilter.Contains = containsFilterQuery;
var stringFilterQuery = new GraphQlQueryParameter<StringFilter>(-->null<--, defaultValue: nameStringFilter);
var builder = new QueryQueryBuilder().WithParameter(stringFilterQuery);
builder.WithWorkouts(new WorkoutQueryBuilder().WithId().WithName(), name: stringFilterQuery);
Hello,
Love the simplicity and usefulness of this generator, thank you!
Our server has nested query parameters to allow fine tuning of queries. For example, I can search a resource as such:
I've tried the below and it seems no matter what I can't reproduce a query as the above. A StringFilter is a class that has various filtering fields such as
contains
,gt
, etc, and is generated in the schema by introspection. I am unsure if I am doing the query parameters correctly.This results in a query that looks like this
If I have only a single layer, it works as expected.
Any idea on how to make it work? If not, is it something that is planned to be supported? And if not, any clues on where the source code should be modified so I can possible to a PR?
Thanks Hakim