A GraphQL server for Umbraco built on express-graphql
Clone this repository locally and run npm install
. Add your database connection details to src/config/config.js
:
host: '1.100.123.123',
port: 1433,
dialect: 'mssql',
database: 'my-umbraco-7',
username: 'bob',
password: ''
We're done!
Start the server using:
npm start
By default, graphql-umbraco comes bundled with the GraphiQL interface for building and running GraphQL queries.
Note:
Once your server has started, browse to /graphiql to use GraphiQL. This URL can be changed in
config.js
You can now run basic GraphQL queries against Umbraco. Here's how to query a node by id
gives the result:
npm test
- Query nodes by URL
- Cache nodes and properties
- Replace the wonky current test mocks with proper Sinon.js mocks
- Recursive, get children to n depth
- Get ancestors
- Automatically resolve media URLs by Id
- Sample React application using Relay architecture
- Remove dependency on babel-cli for npm tasks
Note:
graphql-umbraco is pre-alpha. Ideas will be tried out and things will break. Don't use graphql-umbraco in any production setting.
Pull requests and ideas very much welcome. The best place to chat to me is on Twitter at @perksc