Bagisto Forum

    Bagisto

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    New GraphQL

    General Discussion
    3
    7
    245
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • diverti
      diverti last edited by

      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!

      1 Reply Last reply Reply Quote 0
      • A
        Amitk-Webkul last edited by

        Hi there,

        Which version of Bagisto are you using?

        1 Reply Last reply Reply Quote 0
        • diverti
          diverti last edited by

          Hi!

          Thank you for your quick anwser, my Bagisto version is 1.4.5.

          1 Reply Last reply Reply Quote 0
          • A
            Amitk-Webkul last edited by

            Hi there,

            Can you please elaborate? What exactly you are trying to do?

            diverti 1 Reply Last reply Reply Quote 0
            • diverti
              diverti @Amitk-Webkul last edited by

              @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.

              1 Reply Last reply Reply Quote 0
              • V
                Vivek-Webkul last edited by

                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)

                diverti 1 Reply Last reply Reply Quote 0
                • diverti
                  diverti @Vivek-Webkul last edited by

                  @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.

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post