New GraphQL
-
Hi!
I would like to add new scheme, with keeping the current one.
I saw that lighthouse load the default scheme which contains the current API "endpoints".
How can i make for example a new one, which could be used to mass update product inventories.
I tried #import but i am a little bit confused.Thanks!
-
Hi there,
Which version of Bagisto are you using?
-
Hi!
Thank you for your quick anwser, my Bagisto version is 1.4.5.
-
Hi there,
Can you please elaborate? What exactly you are trying to do?
-
@Amitk-Webkul i use the current GraphQL schemas and i would like to make a new while keeping the current ones. I would like to make for example a schema for updating the inventories of one product. I have to pass so many attributes on the current product update schema.
-
Hi @diverti ,
Greeting for the day!
You just need to follow the below instructions:
Add this package's schema entry to the Bagisto Headless E-commerce package:=> Goto the /vendor/bagisto/graphql-api/src/graphql/schema.graphql file and add the below line at last:
#import /../../../../../packages/Webkul/{your_package_name}/src/graphql/schema.graphql
After making these changes, you will be able to use your package's graphQL APIs.
Thanks & Regards,
Vivek Sharma (Bagisto Support Team) -
@Vivek-Webkul Hi!
In the meantime i do a very similar thing:
I created my own scheme and graphql fiels in my package, change lighthouse config to register this scheme, and now my scheme loads the bagisto-graphql scheme. With this, i am able to push the changes into git and also if the bagisto-graphql get an update, i don't have to modify my scheme or in the vendor folder.