1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, hatchling
5, freezegun
6, graphql-core
7, opentracing
8, pytest-asyncio
9, pytest-mock
10, pytestCheckHook
11, pythonOlder
12, snapshottest
13, starlette
14, typing-extensions
15, werkzeug
16}:
17
18buildPythonPackage rec {
19 pname = "ariadne";
20 version = "0.20.1";
21 format = "pyproject";
22
23 disabled = pythonOlder "3.7";
24
25 src = fetchFromGitHub {
26 owner = "mirumee";
27 repo = pname;
28 rev = "refs/tags/${version}";
29 hash = "sha256-v3CaLMTo/zbNEoE3K+aWnFTCgLetcnN7vOU/sFqLq2k=";
30 };
31
32 nativeBuildInputs = [
33 hatchling
34 ];
35
36 propagatedBuildInputs = [
37 graphql-core
38 starlette
39 typing-extensions
40 ];
41
42 nativeCheckInputs = [
43 freezegun
44 opentracing
45 pytest-asyncio
46 pytest-mock
47 pytestCheckHook
48 snapshottest
49 werkzeug
50 ];
51
52 pythonImportsCheck = [
53 "ariadne"
54 ];
55
56 disabledTests = [
57 # TypeError: TestClient.request() got an unexpected keyword argument 'content'
58 "test_attempt_parse_request_missing_content_type_raises_bad_request_error"
59 "test_attempt_parse_non_json_request_raises_bad_request_error"
60 "test_attempt_parse_non_json_request_body_raises_bad_request_error"
61 ];
62
63 disabledTestPaths = [
64 # missing graphql-sync-dataloader test dep
65 "tests/test_dataloaders.py"
66 "tests/wsgi/test_configuration.py"
67 ];
68
69 meta = with lib; {
70 description = "Python library for implementing GraphQL servers using schema-first approach";
71 homepage = "https://ariadnegraphql.org";
72 changelog = "https://github.com/mirumee/ariadne/blob/${version}/CHANGELOG.md";
73 license = licenses.bsd3;
74 maintainers = with maintainers; [ samuela ];
75 };
76}