How to test GraphQL endpoint using separate database for testing in FastAPI Strawberry?

How to test GraphQL endpoint using separate database for testing in FastAPI Strawberry?

Replace primary database session in all the Strawberry fields with test database session. Perform tests on GraphQL endpoints with requests module.

 

Read More Google Alert – graphql