Skip to content

Commit

Permalink
Merge branch 'client-execute-fixed' into 'master'
Browse files Browse the repository at this point in the history
Client method execute fixed

See merge request sd/pseven/DjangoChannelsGraphqlWs!12
  • Loading branch information
prokher committed Jul 27, 2020
2 parents e25c376 + bff63f9 commit bab91bd
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

# Changelog

## [0.7.4] - 2020-07-27

- Client method 'execute' consumes 'complete' message in case of error.

## [0.7.3] - 2020-07-26

- Logging slightly improved. Thanks to @edouardtheron.
Expand Down
8 changes: 5 additions & 3 deletions channels_graphql_ws/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,11 @@ async def execute(self, query, variables=None):
"""
msg_id = await self.start(query, variables=variables)
resp = await self.receive(wait_id=msg_id)
# Consume 'complete' message.
await self.receive(wait_id=msg_id)
try:
resp = await self.receive(wait_id=msg_id)
finally:
# Consume 'complete' message.
await self.receive(wait_id=msg_id)
return resp

async def subscribe(self, query, *, variables=None, wait_confirmation=True):
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ build-backend = "poetry.masonry.api"
# Docs: https://python-poetry.org/docs/
[tool.poetry]
name = "django-channels-graphql-ws"
version = "0.7.3"
version = "0.7.4"
description = """Django Channels based WebSocket GraphQL server with \
Graphene-like subscriptions"""
authors = ["Alexander A. Prokhorov <[email protected]>"]
Expand Down

0 comments on commit bab91bd

Please sign in to comment.