Closed tessierp closed 6 months ago
/cc @jrestall
Hi @tessierp,
We've mostly been focused on query support but there is also support for graphql mutations, which would allow you to modify content. Problem is there's no examples at this stage I believe.
So you will have to follow the graphql-dotnet docs and also look at how we've done the query side since it will be similar. You will need to start by implementing ISchemaBuilder
and adding what you need to schema.Mutation
. You will probably be interested in this graphql permissions PR https://github.com/OrchardCMS/OrchardCore/pull/3951.
https://graphql-dotnet.github.io/docs/getting-started/mutations/
If you get stuck feel free to ask further questions here and we can support.
@carlwoodhouse
Thanks for the information @jrestall. I will need some time to look into this and probably will build a prototype without that part for now but, I do have a few questions already if you do not mind.
Am I right in assuming that I have to create a content type in the CMS's admin screen for every type of information I want to push? I presume every piece of information will end up in the Document's table? If all that data ends up there, would there be any concerns in terms of performance as it will grow over time?
That's correct @tessierp, for each content type you create from the admin UI, you will automatically get graphql queries generated for. Unfortunately you won't get mutations automatically so would have to develop that part.
I wouldn't worry about performance, I'm no expert but I believe everything is indexed so you won't see performance impacts as the data gets large.
Out the box perf it pretty good for simple queries and the default yes sql indexes that mean most the time your only querying subsets of the data.
If your wanting more advanced queries and custom filters you might need to get intimate with how yessql works.
We’re running about 100k contentitems in our main graphql api which is backed by orchardcore and the perf is very very good.
On Thu, 28 Nov 2019 at 20:08, James Restall notifications@github.com wrote:
That's correct @tessierp https://github.com/tessierp, for each content type you create from the admin UI, you will automatically get graphql queries generated for. Unfortunately you won't get mutations automatically so would have to develop that part.
I wouldn't worry about performance, I'm no expert but I believe everything is indexed so you won't see performance impacts as the data gets large.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/OrchardCMS/OrchardCore/issues/4898?email_source=notifications&email_token=AADRUEBNWXGU5GVUEE5DO4TQWAQNTA5CNFSM4JSI2W4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFNL5XY#issuecomment-559595231, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADRUEEB6X4EFW7ZHJJCBYTQWAQNTANCNFSM4JSI2W4A .
Thank you very much for all your answers. Because of time constraints, for the moment I will be exploring my own custom solution for the data storage. I will be looking forward for some documentation regarding the steps required to support sending / update data through mutations.
Is it possible to use the Orchard's CMS has a gateway to store data. I've seen a lot of videos where you can use GraphQL to get data but nothing so far on pushing data to it. My intent would be to use it in headless mode to get and push data to it.
An example of this, if possible, would be greatly appreciated.