I'm practicing with graphql-dotnet. I created a PropertyQuery as follows:
public class PropertyQuery : ObjectGraphType
{
public PropertyQuery(IPropertyRepository propertyRepository)
{
Field<ListGraphType<PropertyType>>(
"properties",
resolve: context => propertyRepository.GetAll()
);
Field<PropertyType>(
"property"
, arguments: new QueryArguments(new QueryArgument<IntGraphType> { Name = "id" })
, resolve: context => propertyRepository.GetById(context.GetArgument<int>("id"))
);
}
}
Problem occurred with intellisense of Visual Studio (2019). When I passed resolve
parameter of Field
method, the intellisense not suggests GetArgument
or Source
etc... of ResolveFieldContext<TSource>
, instead, it suggests like:
I am confused whether this is a error of visual studio, or the graphql-dotnet library has a problem. I'm a newbie in graphql, and if intellisense suggestions is wrong, I can't continue to practice