Need help with express-graphql-example?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

juffalow
150 Stars 46 Forks MIT License 67 Commits 2 Opened issues

Description

Example project how to use Express and GraphQL

Services available

!
?

Need anything else?

Contributors list

No Data

Express, GraphQL example

License codecov

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: * 1.4.0

Here is a link to older version, that did not use typescript, and used

buildSchema
method and graphql schema file: * 2.0.0

License

MIT license

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.