Skip to content

Commit

Permalink
Remove GraphiQL Explorer; fix headers property (#1174)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shane32 authored Nov 28, 2024
1 parent a530f4b commit 10e5833
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/Ui.GraphiQL/GraphiQLOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@ public class GraphiQLOptions

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

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

/// <summary>
Expand Down
13 changes: 1 addition & 12 deletions src/Ui.GraphiQL/Internal/graphiql.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,6 @@
integrity="sha384-yz3/sqpuplkA7msMo0FE4ekg0xdwdvZ8JX9MVZREsxipqjU4h8IRfmAMRcb1QpUy"
crossorigin="anonymous"
/>
<script
src="https://unpkg.com/[email protected]/graphiqlWithExtensions.min.js"
integrity="sha384-TqI6gT2PjmSrnEOTvGHLad1U4Vm5VoyzMmcKK0C/PLCWTnwPyXhCJY6NYhC/tp19"
crossorigin="anonymous"
></script>
<link
rel="stylesheet"
href="https://unpkg.com/[email protected]/graphiqlWithExtensions.css"
integrity="sha384-GBqwox+q8UtVEyBLBKloN5QDlBDsQnuoSUfMeJH1ZtDiCrrk103D7Bg/WjIvl4ya"
crossorigin="anonymous"
/>
<script
src="https://unpkg.com/[email protected]/browser/client.js"
integrity="sha384-Eqe2SG8kA+Au+rwrgfWJ+epqYAtKGW/As+WdcywebVKX7377xelWa+/il4CHiHXI"
Expand Down Expand Up @@ -286,7 +275,7 @@
onEditQuery: onEditQuery,
onEditVariables: onEditVariables,
onEditOperationName: onEditOperationName,
headerEditorEnabled: @Model.HeaderEditorEnabled,
isHeadersEditorEnabled: @Model.HeaderEditorEnabled,
}),
document.getElementById('graphiql'),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ namespace GraphQL.Server.Ui.GraphiQL
public class GraphiQLOptions
{
public GraphiQLOptions() { }
[System.Obsolete("This property has no effect and will be removed in a future version.")]
public bool ExplorerExtensionEnabled { get; set; }
public string GraphQLEndPoint { get; set; }
public bool GraphQLWsSubscriptions { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ namespace GraphQL.Server.Ui.GraphiQL
public class GraphiQLOptions
{
public GraphiQLOptions() { }
[System.Obsolete("This property has no effect and will be removed in a future version.")]
public bool ExplorerExtensionEnabled { get; set; }
public string GraphQLEndPoint { get; set; }
public bool GraphQLWsSubscriptions { get; set; }
Expand Down

0 comments on commit 10e5833

Please sign in to comment.