@bermanboris/gql-cli
GraphQL server generator
Last updated a year ago by bermanboris .
Original npm · Tarball · package.json
$ cnpm install @bermanboris/gql-cli 
SYNC missed versions from official npm registry.

graphql-ts-server-boilerplate

News Application:

Entities:

Post

  • title
  • text
  • date
  • author (relation)
  • category (relation)

Category

  • title
  • posts (relation)

Author

  • name
  • posts (relation)
 const post = new Entity({
  name: "Post",
  requiresAuth: true,
  fields: {
    title: "string",
    text: "string",
    date: "string",
  }
})

const author = new Entity({
  name: "Author",
  fields: {
    name: "string",
  }
})

const category = new Entity({
  name: "Category",
  fields: {
    title: "string",
  }
})


author.hasMany(post)
post.hasMany(category)
category.hasMany(post)

createPost({
  title: "Today is a good day!",
  text: "Bla bla bla",
  date: "09/08/21",
  categories: ["Trump", "Sport"],
})


mutation {
  createPost({
    title: "Today is a good day!",
    text: "Bla bla bla",
    date: "09/08/21",
    categories: ["Trump"],
  }) {
    id
    title
    text
  }
}

{
  category(title: "Trump") {
    posts {
      title
      text
    }
  }
}

Current Tags

  • 1.0.14                                ...           latest (a year ago)

13 Versions

  • 1.0.14                                ...           a year ago
  • 1.0.12                                ...           a year ago
  • 1.0.11                                ...           2 years ago
  • 1.0.10                                ...           2 years ago
  • 1.0.9                                ...           2 years ago
  • 1.0.8                                ...           2 years ago
  • 1.0.7                                ...           2 years ago
  • 1.0.6                                ...           2 years ago
  • 1.0.5                                ...           2 years ago
  • 1.0.4                                ...           2 years ago
  • 1.0.3                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 13
Last Day 0
Last Week 13
Last Month 4
Dependencies (31)
Dev Dependencies (21)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |