-
Notifications
You must be signed in to change notification settings - Fork 15
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: Create random users in batches in create-data script #2635
Conversation
Create random users in batches of 3 Use graphqlRequestPreconfigured to enclose the GRAPHQL_URI and API_KEY Add character limits for some user and colony fields
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -195,6 +207,9 @@ const getColonyMetadata = /* GraphQL */ ` | |||
} | |||
`; | |||
|
|||
const graphqlRequestPreconfigured = async (queryOrMutation, variables) => | |||
graphqlRequest(queryOrMutation, variables, GRAPHQL_URI, API_KEY) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Big fan of this. 📈
Add char limit for the colony objective description in create-data script
87b56f6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description
Refactored the create-data script in order to minimise failure while creating too many users all at once.
The random users creation is batched in chunks of 3.
Also, added a new method
graphqlRequestPreconfigured
to enclose theGRAPHQL_URI
andAPI_KEY
used for thegraphqlRequest
Add character limits for
Testing
npm ci
npm run dev
node ./scripts/create-data.js --yes
Resolves #2606