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

Allow to override existing schema with GraphQL-faker #156

Open
rossoha opened this issue Sep 15, 2021 · 0 comments
Open

Allow to override existing schema with GraphQL-faker #156

rossoha opened this issue Sep 15, 2021 · 0 comments

Comments

@rossoha
Copy link

rossoha commented Sep 15, 2021

At the moment faker doesn't allow to override fields that already on the backend, but there might be a situation when existing API is not yet implemented and return some default value (like null). So it would be nice to have a way to override such a response.

Example error message: Field "User.firstName" already exists in the schema. It cannot also be defined in this type extension.

Example schema from server:

type User {
    _instanceName: String
     id: UUID
    firstName: String
    lastName: String
}

Example extension file content :

extend type User {  
  firstName: String @fake(type: firstName)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant