Skip to content
المشاريع

juffalow/express-graphql-example

عرض على GitHub

حول

Example project how to use Express and GraphQL. You can find working example with frontend at https://quotes.juffalow.com

تطوير الويب والتطبيقات

كيف تُقاس هذه الأرقام

النمو المقاس للنجوم

خلال 24 ساعة
٠
خلال 7 أيام
٠
خلال 15 يومًا
٠
خلال شهر
٠

تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.

README.md

الأصل

Express, GraphQL example

License codecov

out

How to run the project using Docker

docker-compose up --build

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

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:

Here is a link to older version, that used typescript version 4.x and graphql-express package to handle GrahpQL requests:

Here is a link to older version, that used yarn version 1.22 and express version 4:

License

MIT license

استكشف مشاريع مشابهة ومرتبطة

جارٍ التحميل…