Skip to content

Commit 7eb4e08

Browse files
committed
Fixed Safemode Schema query
1 parent 7f84e47 commit 7eb4e08

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

src/Linq2GraphQL.Client/GraphClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public async Task<GraphQLSchema> GetSchemaForSafeModeAsync()
7373
{
7474
var executor = new QueryExecutor<GraphQLSchema>(this);
7575

76-
var graphRequest = new GraphQLRequest { Query = Helpers.SchemaQuery };
76+
var graphRequest = new GraphQLRequest { Query = Helpers.SchemaQueryIncludeDeprecated };
7777
return await executor.ExecuteRequestAsync("__schema", graphRequest);
7878
});
7979
}

src/Linq2GraphQL.Client/Schema/Helpers.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,15 @@ internal static class Helpers
1212
}
1313
}
1414
}";
15+
16+
internal const string SchemaQueryIncludeDeprecated = @"{
17+
__schema {
18+
types {
19+
name
20+
fields(includeDeprecated: true) {
21+
name
22+
}
23+
}
24+
}
25+
}";
1526
}

0 commit comments

Comments
 (0)