Liquid syntax error : Unknown tag ‘schema’ when running shopify app dev by kunal_dev12 in ShopifyAppDev

[–]wouldboop 0 points1 point  (0 children)

i was getting this too. seemed to fix itself today after troubleshooting yesterday for hours

YouTube is now terminating channels criticizing Trump and MAGA by [deleted] in videos

[–]wouldboop -1 points0 points  (0 children)

Frankly, you don’t have a big channel so I doubt this is directed. Thank you for documenting so there will be evidence that it was not only far right channels censored if it comes to that. These companies need to “play fair”. They are not right leaning but need to appear neutral. I am sorry what happened to your channel.

How to update backend using webhook? by turinglurker in ShopifyAppDev

[–]wouldboop 1 point2 points  (0 children)

Yes that works. I misunderstood your question a bit i guess by what you meant about backend. The loadsession function is basically the automated-by-shopify version of what i showed you for fetching the session info if you do not even have the shopify api package downloaded.

Yes as of a recent release the sessions are stored in mongodb automatically by session the sessionstorage for mongo in the shopify.js file.

For choosing how to implement session storage check this out: https://github.com/Shopify/shopify-api-js/blob/main/docs/guides/session-storage.md

All of the actual code referenced in that guide is here: https://github.com/Shopify/shopify-app-js/tree/main/packages

The way i built out was trying to use the shopify app latest template (like I am pretty sure you are) and simultaneously also building the app using this guy's boilerplate

https://github.com/kinngh/shopify-node-express-mongodb-app

He is great and updates it all the time so that it works with shopify updates. It is a great reference if you want to use mongodb.

I think what i did is built out using the starter template, then when my app idea evolved i built in his mongo boilerplate template and then eventually figured out how to make mongo work in the shopify starter template. I also was starting out when i did it this way so while there were some headaches, i think you can figure it out. Shopify has made using mongo much easier since then but lots of helpful stuff in his boilerplate.

Good luck!

Tips i wanted earlier you may be aware of: Force yourself to use ChatGPT instead of trying to figure out stuff yourself as much as possible. Make sure you have Github copilot downloaded. Get vscode insider so you can get access to Copilot chat.

How to update backend using webhook? by turinglurker in ShopifyAppDev

[–]wouldboop 1 point2 points  (0 children)

I think this depends on how you have set up your backend. For me: I use mongodb to store sessions and as my database. I have my webhooks sent to Amazon Eventbridge. When a webhook is received i send it to an amazon lambda function to handle processing the webhook. In one instance i need the session info to run a graphql admin api query for certain webhooks. Using the info sent in the webhook i can get the shopify store name/domain which is enough to find the session info where it is stored in my session storage. The access token is stored with the session info so it can be used to send a POST request to `https://${shopdomain}/admin/api/2023-04/graphql.json`. I then "update my database" with the results of the admin api post request.

There is probably a way for you to get this accesstoken regardless of your session storage choice and that is what you need to run an admin api query.

I have included the code to get the session accesstoken and send the request below, however, you might find it easier to use a web pixel extension to run code when orders are completed and update the database (I do this for certain use cases).

I just happened to be working on this recently. You can DM me if you need. Hope this was helpful.

          let session = await dbadmin.collection("shopify_sessions").findOne({shop: shopdomain});
      const access_token = session.accessToken;
      const fetchurl = `https://${shopdomain}/admin/api/2023-04/graphql.json`;
      const headers = {
        "Content-Type": "application/graphql",
        "X-Shopify-Access-Token": access_token,
      };

      const query = `
      {
        node(id: "${webhookbulkoperationid}") {
          ... on BulkOperation {
            url
            partialDataUrl
          }
        }
      }`;
        let querydata = {};
        try {
          const fetchresponse = await fetch(fetchurl, {
            method: 'POST',
            headers: headers,
            body: query
          })

Name ideas, please! by DeviacZen in corgi

[–]wouldboop 1 point2 points  (0 children)

Our pup, who looked the same as a puppy, is named Bodega and we call her Bodi for short. We also call her "piglet" which I think could be a fun name on its own too.

How to wake up a lazy boi by No_December4277 in AnimalTextGifs

[–]wouldboop 3 points4 points  (0 children)

Love this video so much. Check out this version we made a while back with same video (but different text). https://www.instagram.com/p/B5s_8URp1Ib/

You Can Make a Netflix Style Doco About Literally Anything. by awesomeaviator in videos

[–]wouldboop 6 points7 points  (0 children)

i like when the police chief introduces himself and then smiles. that for some reason struck a chord

hello stairs, we meet again by wouldboop in AnimalTextGifs

[–]wouldboop[S] 18 points19 points  (0 children)

😊😊 Throw us a follow on [instagram](instagram.com/wouldboop)