This is a prototype distribution to add a headless approach to the Neos ContentRepository
Based on a discussion at the Vienna Sprint (14.10.2019) we agreed to kickstart a prototype to add a headless option to the Neos ContentRepository. This should be achieved with GraphQL.
While providing only all basic types and queries the package should be easily extensible.
The Content Repository adapter should be able to read all available NodeTypes and create a autogenerated sdl including GraphQL Types for all of your NodeTypes.
- Generate the missing schema:
./flow schemagenerator:generate
This command will output a types.grapqhl file at PROJECT_DIR/Data/SchemaGenerator. Move this file to DistributionPackages/CustomApp/Resources/Private/GraphQL/schema.nodetypes.graphql
This step should be handled later via the console just like we do it with doctrine migrations.
- Generate some node data
./flow fixtures:insert
Generate some random nodes and persist them.
- Start the server:
./flow server:run
You should now be able to run GraphQL queries against the endpoint http://127.0.0.1:8081/graphql:
query {
nodeByPath(path: "/dac9b396-35c9-4e85-b2f4-e2f89febeaa3"}) {
identifier
path
name
workspace {
name
title
}
context {
workspaceName
}
... on NeosContentRepositoryTestingText {
properties {
text
}
}
... on NeosContentRepositoryTestingHtml {
properties {source
}
}
}
}
This package acts as an Adapter to the Neos ContentRepository. It will provide all base resolver and type definitions for a Node, Context, Workspace etc. It will also provide a SchemaGenerator that converts all available NodeTypes to a valid GraphQL schema.
This is a fake package that acts as the actually "Application". Later on the app has to configure the GraphQL Endpoint.
Provide some basic queries to fetch node data as well as some filter mechanism to scroll through your result list
Running mutations against the ContentRepository