Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow using a query and cursor together when calling client.feed() #298

Merged
merged 2 commits into from
Nov 4, 2024

Conversation

ecooper
Copy link
Contributor

@ecooper ecooper commented Nov 4, 2024

This PR enables supplying a cursor value when using an unevaluated query with client.feed().

Description

This PR removes a check that prevented you from calling client.feed() with a query and a cursor. It is an unnecessary constraint, and event feeds will behave as you'd expect without this check.

Motivation and context

This change allows you to resume at a given cursor while still passing in a query to generate the event source. Before this change, you'd need to first evaluate the query for the event source yourself before calling feed with cursor.

How was the change tested?

  • An integration test on client was added
  • Existing integration tests pass

Change types

    • Bug fix (non-breaking change that fixes an issue)
    • New feature (non-breaking change that adds functionality)
    • Breaking change (backwards-incompatible fix or feature)

Checklist:

    • My code follows the code style of this project.
    • My change requires a change to Fauna documentation.
    • My change requires a change to the README, and I have updated it accordingly.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@ecooper ecooper marked this pull request as ready for review November 4, 2024 22:13
Copy link
Contributor

@ptpaterson ptpaterson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a good thing to do. The new test covers the use case well.

Copy link
Contributor

@jrodewig jrodewig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 I'll update the README in a separate PR. Thanks!

@ecooper ecooper merged commit 1c347b8 into main Nov 4, 2024
8 checks passed
@ecooper ecooper deleted the FE-6088 branch November 4, 2024 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants