https://github.com/velianarie/graphql-launchdarkly
Demonstrate how to feature toggle an internal working of a graphql endpoint
https://github.com/velianarie/graphql-launchdarkly
Last synced: 6 months ago
JSON representation
Demonstrate how to feature toggle an internal working of a graphql endpoint
- Host: GitHub
- URL: https://github.com/velianarie/graphql-launchdarkly
- Owner: velianarie
- Created: 2018-10-31T01:02:35.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-10-31T14:49:59.000Z (over 6 years ago)
- Last Synced: 2024-04-05T19:32:35.000Z (about 1 year ago)
- Language: JavaScript
- Size: 57.6 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-launchdarkly - velianarie/graphql-launchdarkly
README
# graphql-launchdarkly
Demonstrate how to feature toggle an internal working of a graphql endpoint.## The Toy Example
Graphql query 'positions' returning data coming either from Hive or from SQL.## Manual Toggling
Use a boolean flag to switch between the two source.```
type Query {
positions(useHive: Boolean!): [String]
}
```This isn't ideal especially when working with a published public API.
See serverSimple.js
## With LaunchDarkly - Feature Toggle Management
Consumers of this graphql service don't need to know where the data comes from. With LaunchDarkly we could also toggle the data source on the fly and even configure it based on the logged in user.```
type Query {
positions: [String]
}
```See server.js
### Blog
I blogged about this for more background why I did this in the first place:
http://velianarie.blogspot.com/2018/10/feature-toggling-graphql-service-with.html