What do you think of creating a way to load mutations/queries from a package? #2612
Replies: 2 comments 2 replies
-
I think this concept can be extended to anything really. A package could potentially provide pages, components, mutations, and queries. The main drawback is making the framework "too magic" like RoR feels. For example, when installing the devise gem in Rails you get new controllers, views, and methods on the User model. This is not very obvious for the less experienced, but I agree it's a powerful tool. |
Beta Was this translation helpful? Give feedback.
-
I think something like this would be very cool and definitely has some merits. I think the challenge is finding the right implementation/integration strategy. I'd love to see more discussion on this. |
Beta Was this translation helpful? Give feedback.
-
So, let's say I want to create a package that has some mutations and queries in it and a component that uses it, and I want to bring those parts (the queries, the mutations and the component) into a Blitz app I already have. I haven't found a way to do it because queries and mutations are loaded from the file system, and a npm package
mutations
orqueries
folders aren't supossed to be read and transformed when usinguseQuery
oruseMutation
.My main motivation is that I want to have something similar to Rails engines, and ActiveStorage, which allows to inject a kind of isolated small application into a bigger one. For example, a
blitz-file-uploader
component coming with all the necessary queries and mutations would be something interesting.What do you think about it? Or, more specifically, what do you think of allowing to load queries and mutations from somewhere inside
node_modules
?Beta Was this translation helpful? Give feedback.
All reactions