Added automatic login using auth tokens IO-403
This commit is contained in:
@@ -13,7 +13,7 @@ namespace BodyshopPartner.Utils
|
||||
public static class GraphQL
|
||||
{
|
||||
private static NLog.Logger logger = NLog.LogManager.GetCurrentClassLogger();
|
||||
|
||||
|
||||
public static GraphQLHttpClient CreateGQLClient()
|
||||
{
|
||||
var graphQLClient = new GraphQLHttpClient(AppMetaData.graphQlEndpoint, new NewtonsoftJsonSerializer());
|
||||
@@ -31,7 +31,7 @@ namespace BodyshopPartner.Utils
|
||||
var graphQLResponse = await g.SendQueryAsync<dynamic>(r);
|
||||
if (graphQLResponse.Errors == null)
|
||||
{
|
||||
|
||||
|
||||
//logger.Trace("GQL Response: {0}", graphQLResponse.Data);
|
||||
return graphQLResponse.Data;
|
||||
}
|
||||
@@ -42,7 +42,7 @@ namespace BodyshopPartner.Utils
|
||||
logger.Error("Error executing query.");
|
||||
Array.ForEach(graphQLResponse.Errors, x =>
|
||||
{
|
||||
logger.Error(x.Message);
|
||||
logger.Error("Graphql Error: " + x.Message);
|
||||
if (x.Message.Contains("JWTExpired"))
|
||||
{
|
||||
jwtExpired = true;
|
||||
|
||||
Reference in New Issue
Block a user