Our great sponsors
-
graphql-code-generator
A tool for generating code based on a GraphQL schema and GraphQL operations (query/mutation/subscription), with flexible support for custom plugins.
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
We don't really use any mock-store in our own tests. Rather, we just use a real Redux state, and that's probably what I would recommend. We have a few little hacks for testing "actions in sequence" and you're welcome to just steal those ;) (We just use this reducer to record them)
So, you would "model" nothing at all. You write your graphql queries and mutations and either build endpoints for them by hand or let just graphql-codegen do it for you. I already have the graphql-codegen plugin for RTK query open, but etiquette demands I ask if they want it before I open a PR. As soon as they say "yes", I'll open a PR and you'll have codegen ;)
But really, that should only be a real concern once you reach 50+ endpoints. If you look at the autogenerated api for the OpenAPI petstore example with somewhere around 20+ endpoints, that's still pretty manageable. (And autogenerated, so nothing to worry about anyways.)
You know about ngrx-rtk-query?
Looks like my error is from `oazapfts` and already reported: https://github.com/cellular/oazapfts/issues/51