Skip to content

shoNagai/apollo-server-micro-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

10 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

apollo-server-micro-boilerplate

Getting started with GraphQL on apollo-server-micro ๐Ÿš€

Installation

$ git clone https://github.com/shoNagai/apollo-server-micro-boilerplate.git
$ cd apollo-server-micro-boilerplate
$ yarn install
$ yarn dev

step1 schema design

type Book {
  id: ID!
  title: String!
  author: String!
}
type Query {
  books: [Book!]!
}

step2 generate types

$ yarn generate
src/types/graphql.ts

step3 create a resolver

import mockData from '../mocks/book.json';
import { Resolvers } from '../types/graphql';

export const resolvers: Resolvers = {
  Query: {
    books: () => mockData,
  },
};

step4 try playground

$ yarn dev

playground

About

Getting started with GraphQL on apollo-server-micro ๐Ÿš€

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published