Giter Club home page Giter Club logo

apollo's Introduction

Meteor Apollo

License: MIT

Build Status

Features

  • Plug and Play Zero-Config GraphQL Server
  • GraphQL Playground + Subscription Support
  • MongoDB Relational Support - Grapher
  • Scalable Reactive Queries - RedisOplog
  • HTTP & Subscription authentication support with Meteor Accounts
  • Built-in convenience Date and JSON scalars

Install

If you do not have Meteor up and running, install it from here

meteor create --bare graphql-baby
cd graphql-baby

# Now we install our npm dependencies for server
meteor npm i -S graphql graphql-load apollo-server-express uuid graphql-tools graphql-type-json apollo-live-server

# Dependencies for the client
meteor npm i -S react-apollo apollo-live-client apollo-client apollo-cache-inmemory apollo-link apollo-link-http apollo-link-ws apollo-morpher subscriptions-transport-ws apollo-upload-client

# Now we add the package
meteor add cultofcoders:apollo

# Optional but highly recommended (so you can import .gql/.graphql files)
meteor add swydo:graphql

# If you're looking into Server Side Rendering with React
meteor npm i -S react react-dom react-apollo react-router apollo-link-schema

Let's setup a basic query and initialize our GraphQL server:

// file: server/main.js
import { initialize } from 'meteor/cultofcoders:apollo';
import { load } from 'graphql-load';

load({
  typeDefs: `
    type Query {
      sayHello: String
    }
  `,
  resolvers: {
    Query: {
      sayHello: () => 'Hello world!',
    },
  },
});

initialize();

Now you can safely run your project:

meteor run

Now get on your browser and go to: http://localhost:3000/graphql and give it a spin:

query {
  sayHello
}

Click here to go to the documentation

Useful packages

Premium Support

Looking to start or develop your new project with GraphQL? Reach out to us now, we can help you along every step: [email protected]. We specialise in building high availability GraphQL APIs and with the help with our awesome frontend developers we can easily consume any GraphQL API.

apollo's People

Contributors

maka-io avatar ralphievolt avatar smeijer avatar storytellercz avatar theodordiaconu avatar ujwal-setlur 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.