Fix local seed script and added dev env (#906)

This commit is contained in:
Dotan Simha 2022-12-27 19:11:02 +01:00 committed by GitHub
parent 41ee34a4c7
commit ee74946f77
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View file

@ -40,7 +40,8 @@ We have a script to feed your local instance of Hive.
5. This should report a dummy schema and some dummy usage data to your local instance of Hive,
allowing you to test features e2e
> Note: You can set `STAGING=1` in order to target staging env and seed a target there.
> Note: You can set `STAGING=1` in order to target staging env and seed a target there. Same for
> development env, you can use `DEV=1`
> To send more operations and test heavy load on Hive instance, you can also set `OPERATIONS`
> (amount of operations in each interval round, default is `1`) and `INTERVAL` (frequency of sending

View file

@ -1,4 +1,4 @@
import { createHive } from '@graphql-hive/client';
import { createHive } from '../packages/libraries/client/dist/cjs/index.js';
import { buildSchema, parse } from 'graphql';
async function main() {
@ -11,6 +11,8 @@ async function main() {
enabled: true,
endpoint: process.env.STAGING
? 'https://app.staging.graphql-hive.com/registry'
: process.env.DEV
? 'https://app.dev.graphql-hive.com/registry'
: 'http://localhost:4000/graphql',
author: 'Hive Seed Script',
commit: '1',
@ -20,6 +22,8 @@ async function main() {
clientInfo: 'Fake Hive Client',
endpoint: process.env.STAGING
? 'https://app.staging.graphql-hive.com/usage'
: process.env.DEV
? 'https://app.dev.graphql-hive.com/usage'
: 'http://localhost:4001',
max: 10,
sampleRate: 1,