Skip to content

Catching GraphQLLocatedError for tests #1072

Closed
@laurent-brisbois

Description

@laurent-brisbois

Is your feature request related to a problem? Please describe.
No, question about doing a particular thing

Describe the solution you'd like
I'd like to know the way to catch GraphQLLocatedError, or a way to assertRaises them.

I've tried :

  • try...except way :
try:
    response = self.client.execute(query, variables)
except GraphQLLocatedError:
    self.fail(...)
  • with self.assertRaises(...) way :
with self.assertRaises(GraphQLLocatedError):
    response = self.client.execute(query, variables)

But none of these work. How can I do this ?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions