Neos as Headless CMS

Yes, you are correct.
The only ready-made API that we have is for GraphQL (btw, we plan to make it a part of the core): https://github.com/bwaidelich/Wwwision.Neos.GraphQL

Hi,

I would use a graphQL API like Dmitri already mentioned.
We actually have two nice packages:

composer require wwwision/neos-graphql

or

composer require "t3n/graphql"

If you don’t want that you can also render your content as json, but guess it is easier to use the APIs.

Another option would be the static site generation with Proton, but this is not recommended for production at the moment. But if that would be a nice option, give it a try and feel free to help making this production ready.

composer require \
  flowpack/photon-neos=@dev\
  flowpack/photon-fusion=@dev\
  flowpack/photon-common=@dev\
  flowpack/photon-cli=@dev

We had a talk at the neoscon this year. When the talk is online as single video I can post it here.

Hope that helps a bit.

Great Help.
Really Thanks Dmriti & Markus for help.

I install the graphQL in the package and can see the UI too.

I am afraid, how to get list of the ready-made api so I could used.
Would you please where I can get the all list of ready-made api.

Thanks,
Pawan Kumar

I’m sorry I’ve never used it myself, so don’t know what is your exact problem It seems there’s some server-side error (you can check the Flow logs to see what’s up).
Perhaps @bwaidelich could give you a hand?

It is fine ,you really helped me to understand the things clearly.

Would someone please help me on that about how to get all those ready-made api endpoints so I could use through the GraphQL

with GraphQL there is only one endpoint. The power is in the query language itself
Have a look at “Introspection” to learn how to discover a service’s abilities (schema)

Thanks for the reply.

Still i am getting the error when hitting the uel /neos/graphql.
Please find the attached image,Would anyone please help us in this

Which query did you enter? It looks like you didn’t write a query, yet or sent an empty one. I recommend starting with an instrospection query as mentioned above.

Hi,

I used the below query and still showing the same issue.
{
node{
label
identifier
}
}

Even tried to run with curl command too ,showing the error

please find the attached screenshot for the same

Would someone please help in this?

The error most likely indicates that there is an Exception thrown. Check Data/Logs/Exceptions for more detais or bring up the development console of chrome and check the network tab

Thanks @stolle for help.

There is no error in Data/Logs folder but yes in chrome console ,below is the issue

However I checked with 4.2 and 4.3 version too,same issue occurs,didn’t do any other configuration, just run the below command

composer require wwwision/neos-graphql

Do I need to make some other changes for the same too.

Below might be the root cause of that issue,Please find the attached file

Please help .

I’m wondering of you followed the installation guide in the corresponding graphql packages

https://github.com/bwaidelich/Wwwision.GraphQL ?

It tells that you have to include the routes - and when you get HTML in return, it seems like to didn’t do that

Hi Soren,

Thanks for the reply.
I just followed the below link where it is mentioned after run the composer require wwwision/neos-graphql.
We can directly invoke the /neos/graphql

https://github.com/bwaidelich/Wwwision.Neos.GraphQL

Even In the same concern ,above mentioned that there is already ready-made api.
We can consume easily them.

The link which you shared,I think is for when we want to customized or add new things to that.
Since graphql has been called through the /test url
Please correct me if i am wrong.

The link i gave you is for the actual GraphQL package - the one you include is a adapter to Neos.

In the link I gave you, the installation instruction reads

And, lastly, activate the corresponding routes:

Settings.yaml:

Neos:
  Flow:
    mvc:
      routes:
        'Wwwision.GraphQL':
          variables:
            'endpoint': 'test'

and you mostlike don’t need the variables part.

At least try and see if it solves your issue. And if it does, please submit a PR to the Neos GraphQL package that explains that needed installation setup

So, what’s the acutal respons of your request? If you click preview instead of headers on your latest screenshot you should see the error message. “Unexpected token < in …” just inidicates that graphql playground could not parse the response to json. As you pointed out it’s text/html. And in that request the error is printed out.

Thanks @stolle for helping.

Yes,Clicking on Preview or Response Both show “Failed to show the response Data”.
Please find below attached file.

And in the below files it get failed.

@pawankct91

Did you end up completely ignoring the question if you included the routes from the actual GraphQL package?

I kindly ask you to give feedback on the suggestion

You’re not logged in and not sending the credentials. That’s why it redirects you to /login from /neos.