当前位置: 首页 > 软件库 > 大数据 > 数据查询 >

express-graphql-example

Example project how to use Express and GraphQL
授权协议 MIT License
开发语言 Java
所属分类 大数据、 数据查询
软件类型 开源软件
地区 不详
投 递 者 田巴英
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Express, GraphQL example

out

How to run the project

Install dependencies:

yarn

# or using npm

npm install

Create src/config.ts or rename src/config.example.js and update file with your credentials:

export default {
  port: 3010,
  database: {
    type: 'mysql',
    connection: {
      database : '',
      host : '',
      password : '',
      user : '',
    },
    /*
     * Migrations run on every start of the application.
     * If you initialized the database manually (from the database.sql file),
     * you don't need this.
     */
    migrations: {
      directory: __dirname + '/migrations',
    },
  },
};

Run the project:

yarn start

# or using npm

npm start

Open GraphiQL in your browser http://localhost:3010/graphql

Examples

You can find example queries in EXAMPLES.md.

Old version

Here is a link to an old version, that used sequelize and did not use connections:

Here is a link to older version, that did not use typescript, and used buildSchema method and graphql schema file:

License

MIT license

  • jwt跨域身份验证 In this tutorial I’ll explain how to handle a login mechanism for a GraphQL API using Apollo. 在本教程中,我将解释如何使用Apollo处理GraphQL API的登录机制。 We’ll create a private area that depending on your user

  • graphql by Luis Aguilar 路易斯·阿吉拉尔(Luis Aguilar) 普通英语GraphQL指南 (A Guide to GraphQL in Plain English) 您需要了解的最新流行语正在席卷API开发领域。 (All you need to know about the latest buzzword that’s taking the API develop

  • vue中的突变方法在哪 This is a continuation of a series on GraphQL Actions. The previous tutorial explored GraphQL Queries. This time, we will take a closer look at Mutations. There’s a lot of similarities in

  • Since REST is such a popular approach to building APIs, and much more widespread than GraphQL, it’s fair to assume you are familiar with it, so let’s see the differences between GraphQL and REST. 由于RE

 相关资料
  • GraphQL HTTP Server Middleware Create a GraphQL HTTP server with any HTTP web framework that supports connect styled middleware, including Connect itself, Express and Restify. Installation npm install

  • express-graphql-boilerplate Express GraphQL API with JWT Authentication and support for sqlite, mysql, and postgresql Authentication via JWT Support for sqlite, mysql, and postgresql Support for graph

  • express-graphql-typescript-boilerplate A GraphQL starter kit for building amazing API's in TypeScript and with Express.js framework. This seed repository has a complete GraphQL starter kit written in

  • express-graphql-mongodb-boilerplate Also express-mongodb-rest-api-boilerplate - REST-API Boilerplate Authentication from scratch Sign In, Sign Up, Reset Password, Change Password, Update User E-mail v

  • 我按照Apollo的文档在客户端和服务器上设置GraphQL订阅,虽然我已经完成了90%,但我不知道如何设置订阅通道以及如何将突变连接到这些通道,以便每当突变发生时,服务器都会将新数据推送到客户端。(对于内容,我正在制作一个Reddit克隆,人们可以在其中发布主题,其他人可以对其发表评论。所以当你看到“Topics”或“TopicList”时,把它们想象成帖子。) 到目前为止,我已经成功地为订阅设

  • 我是GraphQL的新手。我使用express-graphql在REST API上为petSore模式生成graphql查询。我能够使用graphql查询获得get API的结果,但无法使用突变获得POST/PUT API的响应。)为了创建宠物,我使用突变, null