Skip to content

Latest commit

 

History

History
54 lines (47 loc) · 1.17 KB

README.md

File metadata and controls

54 lines (47 loc) · 1.17 KB

Journal - Simple App for creating notes

React Native, Native-Base, GraphQl with Apollo and graph.cool

tipCalculator

  • graph.cool Email-Password Auth
  • handles graph.cool server errors
  • allows to add, edit and remove created notes

Setting up GraphCool

  • Graph.cool (hosted DB CMS)
  • setup your account
  • create new project and insert DB Schema provided below
  • probably provide some user access restrictions on posts API
  • update App.js to match your key
const httpLink = new HttpLink({
    uri: 'XXXXXXXXX'
});

DB Schema

type File @model {
  contentType: String!
  createdAt: DateTime!
  id: ID! @isUnique
  name: String!
  secret: String! @isUnique
  size: Int!
  updatedAt: DateTime!
  url: String! @isUnique
}

type Post @model {
  body: String!
  id: ID! @isUnique
  title: String!
  createdAt: DateTime!
  user: User! @relation(name: "PostOnUser")
}

type User @model {
  createdAt: DateTime!
  id: ID! @isUnique
  updatedAt: DateTime!
  email: String @isUnique
  password: String
  posts: [Post!]! @relation(name: "PostOnUser")
}