landscape-graph icon indicating copy to clipboard operation
landscape-graph copied to clipboard

Implement autogenerated mocks for GraphQL API from schema

Open halcyondude opened this issue 2 years ago • 3 comments

https://www.graphql-tools.com/docs/mocking#addmockstoschema

Mocking

The strongly-typed nature of a GraphQL API lends itself extremely well to mocking. This is an important part of a GraphQL-First development process, because it enables frontend developers to build out UI components and features without having to wait for a backend implementation.

Even with a backend that is already built, mocking allows you to test your UI without waiting on slow database requests or building out a component harness with a tool like React Storybook. Default mock example

Let's take a look at how we can mock a GraphQL schema with just one line of code, using the default mocking logic you get out of the box with graphql-tools.

To start, let's grab the schema definition string from the makeExecutableSchema example in the "Generating a schema" article.

halcyondude avatar Sep 03 '22 20:09 halcyondude

i am starting on it .

solo-daemon avatar Nov 15 '22 07:11 solo-daemon

Hello there! I'm interested in contributing to this project and would like to work on this particular issue. Could you please assign me this issue so I can get started? Thank you!

firedragonironfist avatar Mar 11 '23 13:03 firedragonironfist

Hi, @halcyondude I would like to work on these. Here is code autogenerated mocks for GraphQL API from schema: GraphQL API

Please do suggest.

isinghabhishek avatar Apr 12 '23 05:04 isinghabhishek