-
Notifications
You must be signed in to change notification settings - Fork 63
Description
Hi,
I would like to know how I can I implement variables passing to the query.
An example query below
query GetClientsByName($clientName: string){
clients(filter: "clientName == $clientName")
{
hasNextPage
hasPreviousPage
items {
clientCode
clientName
}
totalItems
}
}
I have written a very simple wrapper .net core api using entity graphql.
services.AddGraphQLSchema(provider =>
{
provider.OnFieldCreated = (field) =>
{
if (field.ReturnType.IsList && field.ReturnType.SchemaType.GqlType == GqlTypes.QueryObject && !field.FromType.IsInterface)
{
field.UseFilter().UseSort().UseOffsetPaging(defaultPageSize: DefaultPageSize, maxPageSize: MaxPages);
}
};
});
How Can I modify the current app to include variables support? Any sample application or google links?