mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 17:31:56 +03:00
a21f6cd648
Changes compared to `/v1alpha1/graphql` * Changed all graphql responses in **/v1/graphql** endpoint to be 200. All graphql clients expect responses to be HTTP 200. Non-200 responses are considered transport layer errors. * Errors in http and websocket layer are now consistent and have similar structure.
21 lines
709 B
Python
21 lines
709 B
Python
import pytest
|
|
import yaml
|
|
from validate import check_query_f
|
|
from super_classes import GraphQLEngineTest
|
|
|
|
# @pytest.mark.parametrize("transport", ['http', 'websocket'])
|
|
# graphql parser can't seem to parse {where: null}, disabling
|
|
# websocket till then
|
|
@pytest.mark.parametrize("transport", ['http'])
|
|
class TestGraphQLValidation(GraphQLEngineTest):
|
|
|
|
def test_null_value(self, hge_ctx, transport):
|
|
check_query_f(hge_ctx, self.dir() + "/null_value_err.yaml", transport)
|
|
|
|
def test_null_variable_value(self, hge_ctx, transport):
|
|
check_query_f(hge_ctx, self.dir() + "/null_variable_value_err.yaml", transport)
|
|
|
|
@classmethod
|
|
def dir(cls):
|
|
return "queries/graphql_validation"
|