Skip to content
This repository has been archived by the owner on Oct 21, 2021. It is now read-only.

Select default graphql endpoint more intelligently #8

Closed
josh opened this issue Nov 20, 2017 · 0 comments
Closed

Select default graphql endpoint more intelligently #8

josh opened this issue Nov 20, 2017 · 0 comments

Comments

@josh
Copy link
Contributor

josh commented Nov 20, 2017

I don't like how the current config needs to mutate the ENV vars in order have getGraphQLProjectConfig work as expected. It would be nice if you could pass something to getGraphQLProjectConfig as a fallback like getGraphQLProjectConfig('production'). Even better would be avoiding a hard coded naming requirement and selecting the first endpoint by default. Often there will only be one, no need for anyone to have to configure a name in that case.

// TODO: Investigate other ways set a default GRAPHQL_CONFIG_ENDPOINT_NAME
// for getGraphQLProjectConfig without mutating the environment.
if (!process.env['GRAPHQL_CONFIG_ENDPOINT_NAME']) {
process.env['GRAPHQL_CONFIG_ENDPOINT_NAME'] = 'production'
}

@josh josh closed this as completed in 0164dfe Dec 5, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant