Skip to content

Convert context into query string for FGA queries #438

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

Merged
merged 4 commits into from
May 1, 2025

Conversation

stanleyphu
Copy link
Contributor

Description

This PR updates the FGA query method to convert the context param from a dictionary to a string before making the request.

Documentation

Does this require changes to the WorkOS Docs? E.g. the API Reference or code snippets need updates.

[ ] Yes

If yes, link a related docs PR and add a docs maintainer as a reviewer. Their approval is required.

@stanleyphu stanleyphu requested a review from a team as a code owner April 30, 2025 20:17
@stanleyphu stanleyphu requested a review from gcarvelli April 30, 2025 20:17
warrant_token="warrant_token",
context={"region": "us", "subscription": "pro"},
)
assert response.dict(exclude_none=True) == mock_query_response

Choose a reason for hiding this comment

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

Can we make an assertion on what the request URL looks like? (i.e. it should include a string-ified version of the JSON context)

@stanleyphu stanleyphu force-pushed the bug/convertQueryContextParam branch from 9a92b5d to 21e6f9d Compare April 30, 2025 22:22
@stanleyphu stanleyphu merged commit 43e3535 into main May 1, 2025
6 checks passed
@stanleyphu stanleyphu deleted the bug/convertQueryContextParam branch May 1, 2025 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants