Getting started with nestjs and graphql development

One, environment configuration

  • 1. Official website address

    The official website provides two ways to operategraphql

    • Define the traditional way firstschema
    • Directly use typescript-graphqlthe object method to create
  • 2. Install dependency packages (developed by means of automatic generation by creating objects schema)

    npm install @nestjs/graphql graphql-tools graphql apollo-server-express
    
  • 3. app.module.tsAdd in the file

    import {
         
          
           Module } from '@nestjs/common';
    import {
         
          
           AppControl

Guess you like

Origin blog.csdn.net/kuangshp128/article/details/112141424