What to do when a GraphQL validation fails when using Prefect Server? I'm getting an error: unexpected null value for type "String"

View in #prefect-server on Slack

Lauri_Makinen @Lauri_Makinen: Hi, I am running prefect version 1.2.0 (server is hosted by us). I get following error when trying to fetch flows with cli. Also the prefect ui does not display any flows.

prefect get flows                                                                                                          
Traceback (most recent call last):
...
prefect.exceptions.ClientError: [{'message': 'unexpected null value for type "String"', 'locations': [{'line': 2, 'column': 5}], 'path': ['flow'], 'extensions': {'path': '$.selectionSet.flow.args.where._and[0].project.name._eq', 'code': 'validation-failed', 'exception': {'message': 'unexpected null value for type "String"'}}}]

Kevin_Kho @Kevin_Kho: This is likely related to migrations. You can check How to run Server database migrations manually? to run the migrations manually.

You may also need this environment variable:

export HASURA_GRAPHQL_V1_BOOLEAN_NULL_COLLAPSE=true

as shown here:

Similar discussion:

Lauri_Makinen @Lauri_Makinen: Thanks @Kevin_Kho, setting the environment variable worked! I am running (I am running hasura 2.1.1). For what it’s worth, I also initially thought this was a migration issue, then I wiped my DB and it still happened. But anyhow, now it seems work. Thank you very much for getting back to me so quickly with the correct answer :handshake: :pray: .

Kevin_Kho @Kevin_Kho: Of course!