diff --git a/.circleci/test-server.sh b/.circleci/test-server.sh index e33a5f49d3342..eabd8cd1b4fcc 100755 --- a/.circleci/test-server.sh +++ b/.circleci/test-server.sh @@ -561,6 +561,8 @@ wait_for_port 5001 cache_control_jwk_url='{"type": "RS256", "jwk_url": "http://localhost:5001/jwk-cache-control"}' expires_jwk_url='{"type": "RS256", "jwk_url": "http://localhost:5001/jwk-expires"}' +cc_nomaxage_jwk_url='{"type": "RS256", "jwk_url": "http://localhost:5001/jwk-cache-control?nomaxage"}' +cc_nocache_jwk_url='{"type": "RS256", "jwk_url": "http://localhost:5001/jwk-cache-control?nocache"}' # start HGE with cache control JWK URL export HASURA_GRAPHQL_JWT_SECRET=$cache_control_jwk_url @@ -596,6 +598,26 @@ pytest -n 1 -vv --hge-urls "$HGE_URL" --pg-urls "$HASURA_GRAPHQL_DATABASE_URL" - kill_hge_servers +# start HGE with nomaxage JWK URL +export HASURA_GRAPHQL_JWT_SECRET=$cc_nomaxage_jwk_url +run_hge_with_args serve +wait_for_port 8080 + +pytest -n 1 -vv --hge-urls "$HGE_URL" --pg-urls "$HASURA_GRAPHQL_DATABASE_URL" --hge-key="$HASURA_GRAPHQL_ADMIN_SECRET" --test-jwk-url test_jwk.py -k 'test_cache_control_header' + +kill_hge_servers +unset HASURA_GRAPHQL_JWT_SECRET + +# start HGE with nocache JWK URL +export HASURA_GRAPHQL_JWT_SECRET=$cc_nocache_jwk_url +run_hge_with_args serve +wait_for_port 8080 + +pytest -n 1 -vv --hge-urls "$HGE_URL" --pg-urls "$HASURA_GRAPHQL_DATABASE_URL" --hge-key="$HASURA_GRAPHQL_ADMIN_SECRET" --test-jwk-url test_jwk.py -k 'test_cache_control_header' + +kill_hge_servers +unset HASURA_GRAPHQL_JWT_SECRET + kill $JWKS_PID # end jwk url test diff --git a/console/src/components/Services/ApiExplorer/Analyzer/QueryAnalyzer.js b/console/src/components/Services/ApiExplorer/Analyzer/QueryAnalyzer.js index 46b06f07bfed5..7f0bf64707c03 100644 --- a/console/src/components/Services/ApiExplorer/Analyzer/QueryAnalyzer.js +++ b/console/src/components/Services/ApiExplorer/Analyzer/QueryAnalyzer.js @@ -144,8 +144,8 @@ export default class QueryAnalyser extends React.Component { {this.state.activeNode >= 0 && this.state.analyseData.length > 0 ? this.state.analyseData[ - this.state.activeNode - ].plan.join('\n') + this.state.activeNode + ].plan.join('\n') : ''} @@ -183,9 +183,9 @@ export default class QueryAnalyser extends React.Component { if (type === 'sql') { text = window.sqlFormatter ? window.sqlFormatter.format( - this.state.analyseData[this.state.activeNode].sql, - { language: 'sql' } - ) + this.state.analyseData[this.state.activeNode].sql, + { language: 'sql' } + ) : this.state.analyseData[this.state.activeNode].sql; } else { text = this.state.analyseData[this.state.activeNode].plan.join('\n'); diff --git a/console/src/components/Services/ApiExplorer/utils.js b/console/src/components/Services/ApiExplorer/utils.js index 24bcfa956ef61..3ed44f2e5f52b 100644 --- a/console/src/components/Services/ApiExplorer/utils.js +++ b/console/src/components/Services/ApiExplorer/utils.js @@ -13,8 +13,6 @@ export const getHeadersAsJSON = (headers = []) => { export const isValidGraphQLOperation = operation => { return ( - operation.name && - operation.name.value && - operation.operation === 'query' + operation.name && operation.name.value && operation.operation === 'query' ); }; diff --git a/console/src/components/Services/Data/PermissionsSummary/PermissionsSummary.js b/console/src/components/Services/Data/PermissionsSummary/PermissionsSummary.js index 9ee8efe8b0c88..1769d6bfed3d7 100644 --- a/console/src/components/Services/Data/PermissionsSummary/PermissionsSummary.js +++ b/console/src/components/Services/Data/PermissionsSummary/PermissionsSummary.js @@ -496,7 +496,9 @@ class PermissionsSummary extends Component { const getTablesColumnTable = () => { return (