You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the graphQL endpoint that i am querying - https://anilist.co/graphiql
and here is my query - query A{ Media(id:1, season: SPRING){ id title { romaji english native userPreferred } seasonYear seasonInt season } }
I am trying to query the same using the SAHB GraphQL Client in .Net Fromework. Here is my code that i am using to call that query -
GraphQLQueryArgument[] arguments = new GraphQLQueryArgument[]
{
new GraphQLQueryArgument("id", 1),
new GraphQLQueryArgument("season","SPRING"),
};
class MediaQuery
{
[GraphQLArguments("id", "ID!", "id")]
[GraphQLArguments("season", "String", "season")]
public Media Media { get; set; }
}
class Media
{
public string seasonYear { get; set; }
public string season { get; set; }
}
I am trying to pass both the arguments as attributes. I keep getting the error - "One or more errors occurred."
Inner Exception : Unexpected character encountered while parsing value: <. Path '', line 0, position 0.
Am i missing something here ? how can we pass multiple arguments ?
Please help.
Thanks,
Surya
The text was updated successfully, but these errors were encountered:
This is the graphQL endpoint that i am querying - https://anilist.co/graphiql
and here is my query -
query A{ Media(id:1, season: SPRING){ id title { romaji english native userPreferred } seasonYear seasonInt season } }
I am trying to query the same using the SAHB GraphQL Client in .Net Fromework. Here is my code that i am using to call that query -
GraphQLQueryArgument[] arguments = new GraphQLQueryArgument[]
{
new GraphQLQueryArgument("id", 1),
new GraphQLQueryArgument("season","SPRING"),
};
IGraphQLHttpClient client = GraphQLHttpClient.Default();
var filmResponse = await client.Query < MediaQuery > ("https://anilist.co/graphiql", arguments: arguments);
Console.WriteLine(filmResponse.Result.Media.seasonYear);
Console.ReadKey();
And here are my classes -
class MediaQuery
{
[GraphQLArguments("id", "ID!", "id")]
[GraphQLArguments("season", "String", "season")]
public Media Media { get; set; }
}
I am trying to pass both the arguments as attributes. I keep getting the error - "One or more errors occurred."
Inner Exception : Unexpected character encountered while parsing value: <. Path '', line 0, position 0.
Am i missing something here ? how can we pass multiple arguments ?
Please help.
Thanks,
Surya
The text was updated successfully, but these errors were encountered: