Skip to content
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

Create fake data #236

Closed
3 tasks
ermish opened this issue Aug 28, 2023 · 1 comment · Fixed by #239
Closed
3 tasks

Create fake data #236

ermish opened this issue Aug 28, 2023 · 1 comment · Fixed by #239
Assignees
Labels
backend enhancement New feature or request

Comments

@ermish
Copy link
Collaborator

ermish commented Aug 28, 2023

Requirements

  • We want to be able to load up our mock firebase db with fake test data.
  • We want to be able to run tests and use fake data to save/retrieve.
  • This should be based on the gql types
@ermish ermish added enhancement New feature or request backend labels Aug 28, 2023
@ermish ermish self-assigned this Aug 28, 2023
@theyokohamalife
Copy link
Collaborator

@ermish We already have mocked data in place in the test suite using addMocksToSchema from @graphql-tools/mocks that can be saved/retrieved and is based on the gql types. It has the added benefit of not needing maintenance if the schema is updated. Is there a reason you feel this would be better?

Example:

const mySchema = addMocksToSchema({
            schema,
            resolvers: store => ({
                Query: {
                    healthcareProfessional: (_, { id }) => store.get('HealthcareProfessional', id)
                }
            })
        })

@theyokohamalife theyokohamalife moved this to Backlog in MVP Milestones Aug 28, 2023
@github-project-automation github-project-automation bot moved this from Backlog to Merged in MVP Milestones Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend enhancement New feature or request
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants