728x90 GraphQL2 curl 로 graphql 호출하기 curl 로 graphql 호출하기 curl --insecure -XPOST -H "Content-Type: application/json" 'https://programmers.pe.kr:4000/graphql' --data '{"query":"query { __typename }"}' curl --insecure -XPOST -H "Content-Type: application/json" 'https://programmers.pe.kr:4000/graphql' --data '{"query":"query { books { title } }"}' 2022. 5. 3. apollo graphql server apollo graphql server mkdir graphql-server-example cd graphql-server-example npm init --yes npm install apollo-server graphql touch index.js const { ApolloServer, gql } = require('apollo-server'); // A schema is a collection of type definitions (hence "typeDefs") // that together define the "shape" of queries that are executed against // your data. const typeDefs = gql` # Comments in GraphQL str.. 2022. 4. 27. 이전 1 다음 728x90