mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 01:12:56 +03:00
This commit is contained in:
parent
ce547dc341
commit
b344e7f39c
@ -545,6 +545,10 @@ httpApp corsCfg serverCtx enableConsole consoleAssetsDir enableTelemetry = do
|
||||
|
||||
when enableMetadata $ do
|
||||
|
||||
Spock.post "v1/graphql/explain" gqlExplainAction
|
||||
|
||||
Spock.post "v1alpha1/graphql/explain" gqlExplainAction
|
||||
|
||||
Spock.post "v1/query" $ spockAction encodeQErr id $
|
||||
mkPostHandler $ mkAPIRespHandler v1QueryHandler
|
||||
|
||||
@ -553,6 +557,7 @@ httpApp corsCfg serverCtx enableConsole consoleAssetsDir enableTelemetry = do
|
||||
mkAPIRespHandler $ legacyQueryHandler (TableName tableName) queryType
|
||||
|
||||
when enablePGDump $
|
||||
|
||||
Spock.post "v1alpha1/pg_dump" $ spockAction encodeQErr id $
|
||||
mkPostHandler v1Alpha1PGDumpHandler
|
||||
|
||||
@ -564,13 +569,9 @@ httpApp corsCfg serverCtx enableConsole consoleAssetsDir enableTelemetry = do
|
||||
return $ JSONResp $ HttpResponse res Nothing
|
||||
|
||||
when enableGraphQL $ do
|
||||
Spock.post "v1alpha1/graphql/explain" gqlExplainAction
|
||||
|
||||
Spock.post "v1alpha1/graphql" $ spockAction GH.encodeGQErr id $
|
||||
mkPostHandler $ mkAPIRespHandler v1Alpha1GQHandler
|
||||
|
||||
Spock.post "v1/graphql/explain" gqlExplainAction
|
||||
|
||||
Spock.post "v1/graphql" $ spockAction GH.encodeGQErr allMod200 $
|
||||
mkPostHandler $ mkAPIRespHandler v1GQHandler
|
||||
|
||||
|
@ -27,6 +27,8 @@ class TestMetadataDisabled:
|
||||
def test_metadata_api_1_disabled(self, hge_ctx):
|
||||
check_post_404(hge_ctx,'/api/1/table/foo/select')
|
||||
|
||||
def test_graphql_explain_disabled(self, hge_ctx):
|
||||
check_post_404(hge_ctx, '/v1/graphql/explain')
|
||||
|
||||
@pytest.mark.skipif(not graphql_api_disabled,
|
||||
reason="--test-graphql-disabled is not set. Cannot run GraphQL disabled tests")
|
||||
@ -35,10 +37,6 @@ class TestGraphQLDisabled:
|
||||
def test_graphql_endpoint_disabled(self, hge_ctx):
|
||||
check_post_404(hge_ctx, '/v1/graphql')
|
||||
|
||||
def test_graphql_explain_disabled(self, hge_ctx):
|
||||
check_post_404(hge_ctx, '/v1/graphql/explain')
|
||||
|
||||
|
||||
@pytest.mark.skipif(graphql_api_disabled,
|
||||
reason="--test-graphql-disabled is set. Cannot run GraphQL enabled tests")
|
||||
class TestGraphQLEnabled:
|
||||
|
Loading…
Reference in New Issue
Block a user