https://github.com/streamdal/apollo-server-plugin
Streamdal code-native data pipeline plugin for Apollo Server
https://github.com/streamdal/apollo-server-plugin
Last synced: about 1 year ago
JSON representation
Streamdal code-native data pipeline plugin for Apollo Server
- Host: GitHub
- URL: https://github.com/streamdal/apollo-server-plugin
- Owner: streamdal
- Created: 2024-03-08T14:39:05.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-08T17:00:05.000Z (about 2 years ago)
- Last Synced: 2025-01-14T03:10:54.899Z (over 1 year ago)
- Language: TypeScript
- Size: 30.5 MB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Streamdal code-native data pipeline plugin for Apollo Server
##### Getting started
```
npm install @streamdal/apollo-server-plugin
```
You must have the Streamdal platform running. To bring it up locally, you can use docker compose:
`docker compose up`
Alternatively you can deploy it to your environment, see here for details:
```
https://github.com/streamdal/streamdal/tree/main/docs/install
```
Add configuration. You can set configurations via env variables or code. The configuration
variables you provide will point to the Streamdal platform you ran just above.
If your app supports `.env` files:
```
cp example.env .env
```
Or export them:
```
export STREAMDAL_URL="localhost:8082"
export STREAMDAL_TOKEN="1234"
export STREAMDAL_SERVICE_NAME="user-onboard-service"
```
Or via code: see and uncomment configuration code in the example app:
```
https://github.com/streamdal/streamdal-examples/blob/main/apollo-server-plugin/src/index.ts
```
##### Run the Example App
Clone the examples repository:
```shell
git clone git@github.com:streamdal/streamdal-examples.git
```
```shell
cd streamdal/examples/apollo-server-plugin
npm install
npm start
```
This will fire up an example app running the Streamdal Apollo Server plugin. Go to `http://localhost:4000`
and execute some graphql queries in the playground.
After you've run at least one query, go to `http://localhost:8080` and you will see the above operations
were automatically instrumented and you are now able to create and add pipelines
to them.
