cold-soccer-63228
05/13/2022, 3:58 AM./pants test ::
. It seems to come from the ariadne package, and looks as follows.
E graphql.error.syntax_error.GraphQLSyntaxError: Syntax Error: Unexpected <EOF>
E
E GraphQL request:238:1
E 237 |
E 238 |
E | ^
E 239 |
I've pasted the stack trace in the thread to avoid myself from adding a super long message into the channel.
I initially suspected this may be some issue related to ariadne not specifying their dependencies correctly. Previously, I've added to the overrides
field of the pipenv_requirements
target in the root BUILD
file in order to resolve those types of issues, e.g.
pipenv_requirements(
...
overrides = {
"google-cloud-pubsub": { "dependencies": [":requirements#setuptools"] },
}
)
However, the error message is not easy for me to understand in this case, and I can't quite tell what kind of error this is, and whether it is due to the same root cause. I'm wondering if the Pants engineering team has any tips on how I can diagnose what is going wrong here and how I could go about trying to resolve this.
I've already run the following, and see that ariadne is at the very least correctly listed as a dependency of my target.
➜ ./pants dependencies front_porch/modules/graphql_views/executable_schema.py
//:requirements#ariadne
...
cold-soccer-63228
05/13/2022, 3:59 AM_ ERROR collecting tests/functional/interaction_history/test_interaction_history_utils.py _
< REDACTED FOR BREVITY >
front_porch/modules/graphql_views/executable_schema.py:386: in <module>
executable_schema = make_executable_schema(_schema_pieces, _resolvers, upload_scalar)
/Users/hughhan/.cache/pants/named_caches/pex_root/venvs/d705eb07a9504cff30c9db408d69d319464c0389/7a2690d4c50569a1b21d9e60e967c4e24aa15de2/lib/python3.9/site-packages/ariadne/executable_schema.py:26: in make_executable_schema
ast_document = parse(type_defs)
/Users/hughhan/.cache/pants/named_caches/pex_root/venvs/d705eb07a9504cff30c9db408d69d319464c0389/7a2690d4c50569a1b21d9e60e967c4e24aa15de2/lib/python3.9/site-packages/graphql/language/parser.py:100: in parse
return parser.parse_document()
/Users/hughhan/.cache/pants/named_caches/pex_root/venvs/d705eb07a9504cff30c9db408d69d319464c0389/7a2690d4c50569a1b21d9e60e967c4e24aa15de2/lib/python3.9/site-packages/graphql/language/parser.py:180: in parse_document
definitions=self.many(TokenKind.SOF, self.parse_definition, TokenKind.EOF),
/Users/hughhan/.cache/pants/named_caches/pex_root/venvs/d705eb07a9504cff30c9db408d69d319464c0389/7a2690d4c50569a1b21d9e60e967c4e24aa15de2/lib/python3.9/site-packages/graphql/language/parser.py:1074: in many
nodes = [parse_fn()]
/Users/hughhan/.cache/pants/named_caches/pex_root/venvs/d705eb07a9504cff30c9db408d69d319464c0389/7a2690d4c50569a1b21d9e60e967c4e24aa15de2/lib/python3.9/site-packages/graphql/language/parser.py:218: in parse_definition
raise self.unexpected()
E graphql.error.syntax_error.GraphQLSyntaxError: Syntax Error: Unexpected <EOF>
E
E GraphQL request:238:1
E 237 |
E 238 |
E | ^
E 239 |
curved-television-6568
05/13/2022, 8:01 AMtests/functional/interaction_history/test_interaction_history_utils.py
?curved-television-6568
05/13/2022, 8:02 AMcold-soccer-63228
05/13/2022, 3:14 PMpytest
, it works fine. But running via ./pants test ::
causes this exception to be raised...cold-soccer-63228
05/17/2022, 2:08 PMariadne.load_schema_from_path
, which reads *.graphql
files from directories, which would fail if they aren't added as explicit dependences 😞curved-television-6568
05/17/2022, 2:09 PM