A
Alokai4mo ago
Morve2

Alokai middleware custom integration

Hello, I'm currently working on a project (example) to improve my skills on alokai. I currently have 2 integrations in my middleware (magento and contentful). I'm looking to create a new middleware integration to retrieve data from this api (https://studio.apollographql.com/public/star-wars-swapi/variant/current/home). After reading the documentation (https://docs.alokai.com/integrations/custom/quick-start), I didn't understand how to do this integration from scratch. I'm looking to do something basic to use the data from this api on the front end. Can you help me create this new integration in my middleware?
Star Wars's Graph | GraphOS Studio
The Star Wars API, or "swapi" (Swah-pee) is the world's first quantified and programmatically-accessible data source for all the data from the Star Wars canon universe!
No description
2 Replies
Mateusz Ostafil
Mateusz Ostafil4mo ago
Hi, have you generated an integration boilerplate using npx @vue-storefront/cli create integration ? This will generate an integration project for you. Then you can add new endpoints using: yarn vsf add endpoint <method-name>. After implementing the integration, you want to add it to the middleware. To do so you need to add a configuration which in location points to your integration's index.server.ts file. Read more here: https://docs.alokai.com/middleware/guides/getting-started#adding-integrations
Alokai
Installation
If you're building your Alokai application from scratch, you'll need to set up the middleware to connect to your backend services.
Mateusz Ostafil
Mateusz Ostafil4mo ago
I hope this helps. If not, don't hesitate to ask followup questions.
Want results from more Discord servers?
Add your server