Giter Site home page Giter Site logo

graphql-umbraco's Introduction

graphql-umbraco

A GraphQL server for Umbraco built on express-graphql

Install

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!

Usage

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:

Query result

Tests

npm test

Goals

  • 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.

Contribute

Pull requests and ideas very much welcome. The best place to chat to me is on Twitter at @perksc

graphql-umbraco's People

Contributors

christofur avatar

Stargazers

Nick Hoàng avatar Søren Kottal avatar Casper Thygesen avatar Will Yaworsky avatar Jay McGuinness avatar Greg Rafferty avatar  avatar

Watchers

Casper Thygesen avatar James Cloos avatar Greg Rafferty avatar Jasper C. avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.