-
-
Notifications
You must be signed in to change notification settings - Fork 229
Open
Labels
Description
First off, this project is amazing. It's extremely useful for bootstrapping an app before the graphql server exists.
The faker methods are extremely useful, but I'm finding myself wishing I could run custom code to generate what I need in certain scenarios.
What if there was something like this
schema.faker.graphql
type JiraIssue {
id: ID @fake(type: uuid)
key: String @fake(type: mock, func: "jiraIssue")
}graphql-faker-mocks.js
// Imagine this function does something more exciting
export const jiraIssue = () => 'ABC-123'The semantics here might not be great. It could be a separate directive or the parameters could be different. Ultimately the idea is just to be able to custom mocks.
kuncevic and mcabrams