Build a blog using Strapi, Angular and Apollo

Our community is looking for talented writers who are passionate about our ecosystem (jamstack, open-source, javascript) and willing to share their knowledge/experiences through our Write for the community program.


This is a companion discussion topic for the original entry at https://strapi.io/blog/build-a-blog-with-angular-js-strapi-and-apollo

Firt of all thanks for the tutorial. It is well documented.

However, I cannot get this to work… I tried a couple of times with installing different versions of node (last try was with v12.13.0).
Strapi is running well on localhost:1337. I followed all the steps for content management and creating the content types. My localhost:4200 is also running but it looks like this:


When inspecting, the console gives the following error:

ERROR Error: Network error: Http failure response for http://localhost:1337/graphql: 400 Bad Request
    at new ApolloError (bundle.esm.js:63:1)
    at bundle.esm.js:1247:1
    at bundle.esm.js:1559:1
    at Set.forEach (<anonymous>)
    at bundle.esm.js:1557:1
    at Map.forEach (<anonymous>)
    at QueryManager.push../node_modules/apollo-client/bundle.esm.js.QueryManager.broadcastQueries (bundle.esm.js:1555:1)
    at bundle.esm.js:1161:1
    at ZoneDelegate.invoke (zone-evergreen.js:359:1)
    at Object.onInvoke (core.js:39699:1)

Any ideas what the problem might be?

I had the same problem. I was using StrapiV4 instead of version 3, like in the tutorial. The problem is that the query to retrieve the data, doesn’t work using Strapi v4.
I solved this by using the command “npx create-strapi-app@3.6.9 BackEnd --quickstart --no-run”.
Hope someone can fix this for version 4 of Strapi, but meanwhile you can use this version that works perfectly.