logo

JEONGGON

    블로그
github
mode
목 차
down-arrow

GraphQL GraphiQL

2024.03.17.

post-thumbnail

GraphiQL

1. GraphiQL이란?

  • GraphQL을 테스트 할 수 있는 IDE로서 로컬에서 개발할 때도 사용할 수 있으며 효율적인 개발이 가능함
  • 따로 추가적인 설치없이 express-graphql 패키지 안에 내장되어 있음

1-1. GraphiQL 사용

- 설정추가

  • graphqlHTTP 속성에 graphiql:true 를 추가하기
// server.js

// ...
app.use(
  "/graphql",
  graphqlHTTP({
    schema: schema,
    rootValue: root,
    graphiql: true, // 추가하기
  })
);
// ...

- 브라우저로 접근

  • graphql URL로 접근
http://localhost:4000/graphql

GraphQL_graphiql
브라우저에서 URL을 통해 GraphiQL 실행

graphqldataquerynosqlgraphiql
profile

조정곤

주니어 프론트엔드 개발자

github
linkedin
instagram
email

< 이전글

Webpack 소개

다음글 >

GraphQL Schema

Graphql 포스트 (8)

down-arrow
GraphQL Expressjs 서버GraphQL 소개GraphQL GraphiQLGraphQL SchemaGraphQL ResolverGraphQL graphql-toolsGraphQL Mutation - CRUDGraphQL 필터링