File tree Expand file tree Collapse file tree 3 files changed +12
-14
lines changed
src/Symfony/Bundle/Resources Expand file tree Collapse file tree 3 files changed +12
-14
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ 'use strict' ;
2
+
3
+ const graphiQlLink = document . querySelector ( '.graphiql-link' ) ;
4
+ if ( graphiQlLink ) {
5
+ graphiQlLink . addEventListener ( 'click' , e => {
6
+ if ( ! e . target . hasAttribute ( 'href' ) ) {
7
+ alert ( 'GraphQL support is not enabled, see https://api-platform.com/docs/core/graphql/' ) ;
8
+ }
9
+ } ) ;
10
+ }
Original file line number Diff line number Diff line change 84
84
{% set active_ui = app .request .get (' ui' , ' swagger_ui' ) %}
85
85
{% if swaggerUiEnabled and active_ui != ' swagger_ui' %}<a href =" {{ path(' api_doc' ) }}" >Swagger UI</a >{% endif %}
86
86
{% if reDocEnabled and active_ui != ' re_doc' %}<a href =" {{ path(' api_doc' , {' ui' : ' re_doc' }) }}" >ReDoc</a >{% endif %}
87
- <a href =" {{ path(' api_graphql_graphiql' ) }}" class =" graphql-docs- link" {{ graphiQlEnabled ? ' data-graphql-enabled ' }} >GraphiQL</a >
87
+ {% if not graphQlEnabled or graphiQlEnabled %} <a {% if graphiQlEnabled %} href =" {{ path(' api_graphql_graphiql' ) }}" {% endif %} class =" graphiql- link" >GraphiQL</a >{% endif %}
88
88
{% if graphQlPlaygroundEnabled %}<a href =" {{ path(' api_graphql_graphql_playground' ) }}" >GraphQL Playground</a >{% endif %}
89
89
</div >
90
90
</div >
99
99
<script src =" {{ asset(' bundles/apiplatform/swagger-ui/swagger-ui-standalone-preset.js' , assetPackage ) }}" ></script >
100
100
<script src =" {{ asset(' bundles/apiplatform/init-swagger-ui.js' , assetPackage ) }}" ></script >
101
101
{% endif %}
102
- <script src =" {{ asset(' bundles/apiplatform/init-all -ui.js' , assetPackage ) }}" ></script >
102
+ <script src =" {{ asset(' bundles/apiplatform/init-common -ui.js' , assetPackage ) }}" defer ></script >
103
103
{% endblock %}
104
104
105
105
</body >
You can’t perform that action at this time.
0 commit comments