Skip to content

Commit 10e5833

Browse files
authored
Remove GraphiQL Explorer; fix headers property (#1174)
1 parent a530f4b commit 10e5833

File tree

4 files changed

+5
-14
lines changed

4 files changed

+5
-14
lines changed

src/Ui.GraphiQL/GraphiQLOptions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,16 @@ public class GraphiQLOptions
3333

3434
/// <summary>
3535
/// Enables the header editor when <see langword="true"/>.
36-
/// Not supported when <see cref="ExplorerExtensionEnabled"/> is <see langword="true"/>.
3736
/// </summary>
3837
/// <remarks>
3938
/// Original setting from <see href="https://github.com/graphql/graphiql/blob/08250feb6ee8335c3b1ca83a912911ae92a75722/packages/graphiql/src/components/GraphiQL.tsx#L186">GraphiQL</see>.
4039
/// </remarks>
4140
public bool HeaderEditorEnabled { get; set; } = true;
4241

4342
/// <summary>
44-
/// Enables the explorer extension when <see langword="true"/>.
43+
/// This property has no effect.
4544
/// </summary>
45+
[Obsolete("This property has no effect and will be removed in a future version.")]
4646
public bool ExplorerExtensionEnabled { get; set; } = true;
4747

4848
/// <summary>

src/Ui.GraphiQL/Internal/graphiql.cshtml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,6 @@
5656
integrity="sha384-yz3/sqpuplkA7msMo0FE4ekg0xdwdvZ8JX9MVZREsxipqjU4h8IRfmAMRcb1QpUy"
5757
crossorigin="anonymous"
5858
/>
59-
<script
60-
src="https://unpkg.com/[email protected]/graphiqlWithExtensions.min.js"
61-
integrity="sha384-TqI6gT2PjmSrnEOTvGHLad1U4Vm5VoyzMmcKK0C/PLCWTnwPyXhCJY6NYhC/tp19"
62-
crossorigin="anonymous"
63-
></script>
64-
<link
65-
rel="stylesheet"
66-
href="https://unpkg.com/[email protected]/graphiqlWithExtensions.css"
67-
integrity="sha384-GBqwox+q8UtVEyBLBKloN5QDlBDsQnuoSUfMeJH1ZtDiCrrk103D7Bg/WjIvl4ya"
68-
crossorigin="anonymous"
69-
/>
7059
<script
7160
src="https://unpkg.com/[email protected]/browser/client.js"
7261
integrity="sha384-Eqe2SG8kA+Au+rwrgfWJ+epqYAtKGW/As+WdcywebVKX7377xelWa+/il4CHiHXI"
@@ -286,7 +275,7 @@
286275
onEditQuery: onEditQuery,
287276
onEditVariables: onEditVariables,
288277
onEditOperationName: onEditOperationName,
289-
headerEditorEnabled: @Model.HeaderEditorEnabled,
278+
isHeadersEditorEnabled: @Model.HeaderEditorEnabled,
290279
}),
291280
document.getElementById('graphiql'),
292281
);

tests/ApiApprovalTests/net80+netcoreapp31/GraphQL.Server.Ui.GraphiQL.approved.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ namespace GraphQL.Server.Ui.GraphiQL
1414
public class GraphiQLOptions
1515
{
1616
public GraphiQLOptions() { }
17+
[System.Obsolete("This property has no effect and will be removed in a future version.")]
1718
public bool ExplorerExtensionEnabled { get; set; }
1819
public string GraphQLEndPoint { get; set; }
1920
public bool GraphQLWsSubscriptions { get; set; }

tests/ApiApprovalTests/netstandard20/GraphQL.Server.Ui.GraphiQL.approved.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ namespace GraphQL.Server.Ui.GraphiQL
1414
public class GraphiQLOptions
1515
{
1616
public GraphiQLOptions() { }
17+
[System.Obsolete("This property has no effect and will be removed in a future version.")]
1718
public bool ExplorerExtensionEnabled { get; set; }
1819
public string GraphQLEndPoint { get; set; }
1920
public bool GraphQLWsSubscriptions { get; set; }

0 commit comments

Comments
 (0)