-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
feat(openapi-tooling): allow creating a react query layer on top of the generated client #24487
base: master
Are you sure you want to change the base?
feat(openapi-tooling): allow creating a react query layer on top of the generated client #24487
Conversation
0bfe6a7
to
430f8cb
Compare
Missing ChangesetsThe following package(s) are changed by this PR but do not have a changeset:
See CONTRIBUTING.md for more information about how to add changesets. Changed Packages
|
This PR has been automatically marked as stale because it has not had recent activity from the author. It will be closed if no further activity occurs. If the PR was closed and you want it re-opened, let us know and we'll re-open the PR so that you can continue the contribution! |
This PR has been automatically marked as stale because it has not had recent activity from the author. It will be closed if no further activity occurs. If the PR was closed and you want it re-opened, let us know and we'll re-open the PR so that you can continue the contribution! |
Looks like some conflicts crept in, I'll take a look at those this week. |
Oh I hadn't seen this, interesting! Is it ready for review? |
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
84ab4ce
to
77d57ec
Compare
This PR has been automatically marked as stale because it has not had recent activity from the author. It will be closed if no further activity occurs. If the PR was closed and you want it re-opened, let us know and we'll re-open the PR so that you can continue the contribution! |
Hey, I just made a Pull Request!
What's better than 1 level of generated code? ⭐ 😎 ⭐
The goal of this PR is to demonstrate the viability of automatically generating react use hooks that can be used directly in code without having to instantiate the generated client. Most of that work is being done in
plugins/catalog-react/src/generated/apis/DefaultApi.query.ts
. Users should be able to immediately import the react query hook and get started writing UI components -- no need to worry about the API layer at all. Some parts of it leak out, as the request object hasbody
,query
,path
keys, but I think that's fine for now. These hooks can be wrapped again if desired or overridden.TODO:
-common/client
pattern from feat(openapi-tooling): stop inferring server types #23610 (this won't build until that's done)✔️ Checklist
Signed-off-by
line in the message. (more info)