bokjo
bokjo
AAlokai
Created by Muhammad Usman on 3/19/2024 in #🙋|general-help
what is alokai?
7 replies
AAlokai
Created by bokjo on 9/26/2023 in #🙋|general-help
New Storefront SDK integration + Middleware rewrite from old (Nuxt) v2 composables - getting started
NP, i'll create improvement/FR task for this one i guess
35 replies
AAlokai
Created by bokjo on 9/26/2023 in #🙋|general-help
New Storefront SDK integration + Middleware rewrite from old (Nuxt) v2 composables - getting started
https://github.com/vuestorefront/vue-storefront/issues/6970 done... p.s will see what happens if i handle explicitly the error in the api-client package
35 replies
AAlokai
Created by bokjo on 9/26/2023 in #🙋|general-help
New Storefront SDK integration + Middleware rewrite from old (Nuxt) v2 composables - getting started
i'll open up a github issues it is not a problem, but where? vsf sdk/middleware repo or boilerplate? (no idea where the error is comming from)
35 replies
AAlokai
Created by Madhusudhanan on 10/3/2023 in #🙋|general-help
Dedicated channels
no more dedicated channels, everything is in #🙋|general-help with tags/labels
3 replies
AAlokai
Created by bokjo on 9/26/2023 in #🙋|general-help
New Storefront SDK integration + Middleware rewrite from old (Nuxt) v2 composables - getting started
p.s is it intentional to return generic 500 error from the sdk (or whenever this error is comming from, cannot find it in any repo...) in the app like ServerError: Response not successful. Please, check server logs for more details. even tho the middleware returned something like ServerError: Response not successful: Received status code 401 ?... would expect to be just propagated as is
35 replies
AAlokai
Created by bokjo on 9/26/2023 in #🙋|general-help
New Storefront SDK integration + Middleware rewrite from old (Nuxt) v2 composables - getting started
Hey @rohrig is there some validation options in place for the middleware integration settings to fail starting if some mandatory field like apiUrl or apiKey is not provided?
35 replies
AAlokai
Created by bokjo on 9/26/2023 in #🙋|general-help
New Storefront SDK integration + Middleware rewrite from old (Nuxt) v2 composables - getting started
Hey @Filip Rakowski thanks for the suggestion, much appreciated! Guess the one endpoint makes sense for executing arbitrary custom queries, and leave the frontend implementor to deal with "implementation". The problem again here is that the provided/suggested productQuery is static and will most likely contain all the data from product, which might be fine when you are building something like ProductDetail page but certainly is not needed for some other random place where lets say just sku, name, image and inventory is needed. My idea was on the lines of leave the productDetail endpoint as is and provide an opinionated query to begin with, if you don't like it or need something extra then override and provide custom query... but you will have to be constrained on the product gql contract (and not provide 6 other nested queries along the way), i might explore something like graphql-zeus that builds the typescript types and provides you with autocomplete query builder of sorts (similar experience like writing the query in a playground....) . Is there some concrete contract/interface that the SDK should follow? Especially in what it can export as additional helper functions? (like the customQueryBuilder from above) Speaking of contract/interfaces, is there some plugin mechanism and/or middleware that the custom implementation SDK can provide? Things like Authn/Authz , login, JWT, OAuth2 flow handling, payment provider webhook handlers... like plugin marketplace that can be used with config? Or everything is left open to the integration builder to handle it as it fits?
35 replies
AAlokai
Created by bokjo on 9/26/2023 in #🙋|general-help
New Storefront SDK integration + Middleware rewrite from old (Nuxt) v2 composables - getting started
@rohrig yeah it is not big of a deal, like small issues here and there... but i'm more concerned about the overall architecture and options regarding GQL backends/APIs. Who is the best person to speak to about general ideas and possibilities?
It feels like the middleware is more suitable for REST apis, with GQL ones I'm loosing the general idea of GQL to fetch what is needed from the backend and just do over-fetching aka. fetch everything what the GQL API offers for that query/mutation... which defies the purpose of GQL. I would rather build some kind of query builder on SDK side where the user will specify what it needs from that query/mutation and pass that to the backend/API... but that would be a bit more involved. I'm looking at the Magento2 GQL implementation and borrowing some ideas (where I have to report some issues just looking at the code btw...), guess there the implementation makes sense because the gql api seems to be monolithic and without federation. The custom query part is nice but a bit cumbersome and for advanced users. Also if I opt to build out integration as the one before it will be too opinionated and people will just start overwriting stuff with custom queries...
35 replies
AAlokai
Created by bokjo on 9/26/2023 in #🙋|general-help
New Storefront SDK integration + Middleware rewrite from old (Nuxt) v2 composables - getting started
Hey thanks for letting me know! I've started porting stuff... still missing bunch of GQL boilerplate setup and testing to do. Managed to have it in a updated but stable enough state for now (not really happy with the setup, but will improve/change it accordingly later on), but kind of constrained on time until next week. Will report extra stuff if they come up later, let me know if I can help somehow otherwise in the meantime.
35 replies
AAlokai
Created by bokjo on 9/26/2023 in #🙋|general-help
New Storefront SDK integration + Middleware rewrite from old (Nuxt) v2 composables - getting started
Hey @rohrig created https://github.com/vuestorefront/integration-boilerplate/issues/21 and https://github.com/vuestorefront/integration-boilerplate/issues/20 for now will add more if needed 🙂 p.s successfully update all packages to latest and run on NodeJS v20
35 replies
AAlokai
Created by bokjo on 9/26/2023 in #🙋|general-help
New Storefront SDK integration + Middleware rewrite from old (Nuxt) v2 composables - getting started
perfect, sorry cannot create those right away... i'm trying to update packages one by one, few of them have new major versions and have no idea what might break (wether due to update or Node v20 I'm using). for example rollup-plugin-terser for @rollup/plugin-terser and rollup-plugin-typescript2 for @rollup/plugin-typescript which doesn't support objectHashIgnoreUnknownHack: false. I see quite a lot of the same or similar inplementation with the old boilerplate for Nuxt v2 (which was sort of stuck to Node v16). But really hate working with old or not that maintained packages...
p.s there are some missing packages and build fails for the playground app... @vue-storefront/sdk is missing as package but it is imported in playground/app/sdk.config.ts... Strange thing is that with lerna -> "npmClient": "yarn" it was working ok (guess due to the workspaces and resolution, but with "npmClient": "npm" it fails to build.
35 replies
AAlokai
Created by bokjo on 9/26/2023 in #🙋|general-help
New Storefront SDK integration + Middleware rewrite from old (Nuxt) v2 composables - getting started
also one more remark for now 😅 , see the examples and also over on the magento2 sdk implemetation all the methods ali something like addXYZCart, removeXYZCart , productXYZ , products etc. etc which is becomes really cumbersome and not that visible really fast, and also you end up with a lot of routes on the middleware like /boilerplate/addXYZCart . Is this due to the integrations interface of sorts? and it is recommended to go that route? It would be nice if i can put everything related to a business scope in a separate folder like products, cart etc. and end up on middleware side with something like /boilerplate/products/xyz, boilerplate/cart/xyz... hope you get my point
35 replies
AAlokai
Created by bokjo on 9/26/2023 in #🙋|general-help
New Storefront SDK integration + Middleware rewrite from old (Nuxt) v2 composables - getting started
p.s when it updates packages/api-client/src/types/api/endpoints.ts it uses BoilerplateIntegrationContext which is hardcoded and becomes exampleChe(context: BoilerplateIntegrationContext, params: TODO): Promise<TODO>; even tho you have updated the context type above... it is not a big deal you can change it easilly, but it is strange to see the build fail right away 🙂
35 replies
AAlokai
Created by bokjo on 9/26/2023 in #🙋|general-help
New Storefront SDK integration + Middleware rewrite from old (Nuxt) v2 composables - getting started
Hey @rohrig , thanks for the response. Still figguring out things, rewatched some of your videos and plan to go thhrough your fresh couse as well soon. I'm gatering some stuff as i go allong, there are some issues in the docs, like links and some references to @vsf-enterprise/sdk, some hardcoded package versions in the boilerplate like "@vue-storefront/middleware": "3.0.0-rc.2", for example that need updating and making sure it works with the latest version ok. npx @vue-storefront/cli add endpoint exampleChe works but it doesn't report all the stuff it is doing.
npx @vue-storefront/cli add endpoint exampleChe

┌ Endpoint exampleChe has been created

◇ Files created:

◇ - packages/api-client/src/api/exampleChe

◇ - packages/sdk/src/methods/exampleChe

◇ Files updated:

◇ - packages/api-client/src/api/index.ts

◇ - packages/sdk/src/methods/index.ts

◇ - packages/api-client/src/types/api/endpoints.ts

◇ Run build command to build the project and dev command to start the playground again
npx @vue-storefront/cli add endpoint exampleChe

┌ Endpoint exampleChe has been created

◇ Files created:

◇ - packages/api-client/src/api/exampleChe

◇ - packages/sdk/src/methods/exampleChe

◇ Files updated:

◇ - packages/api-client/src/api/index.ts

◇ - packages/sdk/src/methods/index.ts

◇ - packages/api-client/src/types/api/endpoints.ts

◇ Run build command to build the project and dev command to start the playground again
it also creates a exampleChe.vue page but in the wrong location... goes to playground/app/pages/exampleChe.vue instead of to playground/app/pages/methods/exampleChe.vue also the template is hardcoded to const { data } = await sdk.boilerplate.exampleChe('test'); it seems, it doesn't respect the custom module you are building that is named lets say my_example and it is already present in the sdk.config.ts sdkConfig object. should become const { data } = await sdk.my_example.exampleChe('test'); Will try to gather as much as possible things like this and compile them in one place!
35 replies
AAlokai
Created by bokjo on 9/26/2023 in #🙋|general-help
New Storefront SDK integration + Middleware rewrite from old (Nuxt) v2 composables - getting started
p.s i see recomendations to use yarn everywhere almost, is there some special reason for it? some issues with npm?
35 replies
AAlokai
Created by bokjo on 9/26/2023 in #🙋|general-help
New Storefront SDK integration + Middleware rewrite from old (Nuxt) v2 composables - getting started
Hey @skirianov thanks for the reply, much appreciated. I've started with https://docs.vuestorefront.io/integrations/custom/quick-start ... the scaffold is there and starts fine. But there is also ./packages/demo middleware, which is not mentioned in the page above and i guess is just a demo middleware to make everything work. Essentially we need to create a concrete middleware for our api as well? Can this be done in the same (mono) repo of the custom integration or it should be its own separate repo? The integration should expose just the SDK? like lets say @my-company/storefront-sdk, or it is fine exposing one more package like @my-company/storefront-middleware? Also with the example integration boilerplate app there is ./playground/middleware which is essentially the same as ./packages/demo one, what is the deal with both of those? The Nuxt/Next playground app has to be deployed with baked in middleware server running, or it can be external server running somewhere else (as mentioned in some video/diagram i saw?)
35 replies
AAlokai
Created by bokjo on 9/26/2023 in #🙋|general-help
New Storefront SDK integration + Middleware rewrite from old (Nuxt) v2 composables - getting started
Ok perfect, thanks Will have a look at that one too, i'll need to build only integration now i guess. Still don't know all the new stuff and how everything works
35 replies
AAlokai
Created by bokjo on 9/26/2023 in #🙋|general-help
New Storefront SDK integration + Middleware rewrite from old (Nuxt) v2 composables - getting started
Hey @Darren R thanks for the reply, i'll take a look! Wasn't this repo in the vuestorefront github, or I'm mistaken, will have to go and watch the videos again 😅 Also is this one https://github.com/vuestorefront/magento2 somehow related?
35 replies
AAlokai
Created by bokjo on 9/6/2023 in #🙋|general-help
What happened to this server? Where did all the channels go?
yap same for me, says No Access ... all the channels like vendure, shopify the new magento and sdk community project channel... guess we miss some memo somewhere
9 replies