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

fix: NewClient respects FAUNA_ENDPOINT environment variable #189

Merged
merged 1 commit into from
Dec 2, 2024

Conversation

cynicaljoy
Copy link
Contributor

Description

Updated fauna.NewClient to respect the FAUNA_ENDPOINT environment variable.

Motivation and context

We should be consistent with our support of the environment variables.

How was the change tested?

Included a test

Screenshots (if appropriate):

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.

@cynicaljoy cynicaljoy requested a review from pnwpedro November 28, 2024 01:00
Copy link
Collaborator

@pnwpedro pnwpedro left a comment

Choose a reason for hiding this comment

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

Approved, but is the only way to set the endpoint the env var? That seems like a miss to me. We should be able to set the endpoint via a config function on NewClient() as well.

@cynicaljoy
Copy link
Contributor Author

Approved, but is the only way to set the endpoint the env var? That seems like a miss to me. We should be able to set the endpoint via a config function on NewClient() as well.

No, you can specify the endpoint using the config options functions variadic.

@cynicaljoy cynicaljoy merged commit cc18e33 into main Dec 2, 2024
5 checks passed
@cynicaljoy cynicaljoy deleted the client-endpoint-env branch December 2, 2024 14:06
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.

2 participants