Node.js Express에서 GraphQL 구현
2022. 2. 7. 06:58ㆍ서버 프로그래밍
1. PostgreSQL과 연동하는 GraphQL 구현
https://blog.harveydelaney.com/setting-up-graphql-express-and-postgresql/
다 좋은데 오래된 예제라 다음 두가지 수정이 필요하다.
(1) inside your schema.js as you create Object Type for String as
fields: {
name: {type: String}
}
(2) Please replace your expressGraphQL with graphqlHTTP as it was destructured
Use:
const { graphqlHTTP } = require('express-graphql');
or
const expressGraphQL = require('express-graphql').graphqlHTTP
https://stackoverflow.com/questions/65517979/expressgraphql-is-not-a-function
2. MongoDB와 연동하는 GraphQL 구현
https://dev.to/adityajoshi12/graphql-with-nodejs-and-mongodb-2bdm
기타
https://zinirun.github.io/2020/10/27/graphql-crud-sample/
https://buddy.works/tutorials/building-graphql-server-using-nodejs-and-express
https://blog.logrocket.com/creating-a-node-js-graphql-server-using-prisma-2/