-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
Add a Docker Playground #17
Comments
I am a tRPC core maintainer so I could try to make that happen if it were possible. Unfortunately, routers are not portable. Resolvers can import from anywhere and run anything. What you can do is use the playground with an express server and bundle your code. |
@sachinraja Yeah.. I think you are right... I tried to print out the actual // console.log(JSON.stringify(appRouter, null,2))
{
"_def": {
"queries": {
"test.hello": {
"middlewares": [],
"inputParser": {
"_def": {
"innerType": {
"_def": {
"innerType": {
"_def": {
"unknownKeys": "strip",
"catchall": {
"_def": {
"typeName": "ZodNever"
}
},
"typeName": "ZodObject"
},
"_cached": null
},
"typeName": "ZodOptional"
}
},
"typeName": "ZodNullable"
}
}
}
},
"mutations": {},
"subscriptions": {},
"middlewares": [],
"transformer": {
"input": {},
"output": {}
}
}
} I really think it would be a great feature to be able to run the Playground on docker by only setting the API endpoint as an environment variable. |
I'm starting to understand more the codebase.
Couldn't we put this inside the main trpc repo? I believe that if we could do that, people would be able to run the dockerized playground without having to make any changes to the code. What do you think? |
I don't think we'll be doing anything like that in core. But we can potentially offer an option to pass that "schema" instead of your router in this project. |
Would it be possible to add a Dockerized version of the playground?
One that people could run without the need to import the
appRouter
to setup the playground?I believe that to make it possible, we would need a way to get the router configuration from the trpc endpoint.
Does that functionality already exist?
If not, would it be possible to sync with the trpc team and make it?
I love this project, and I think its super important for the trpc community.
I would love to help contributing.
The text was updated successfully, but these errors were encountered: