1.6.3 • Published 2 years ago

graphql-qiufen-pro v1.6.3

Weekly downloads
-
License
-
Repository
github
Last release
2 years ago

graphql-qiufen-pro

graphql-qiufen-pro-docs

Features

  • graphql doc
  • Gqls modification is supported synchronously
  • Support graphql schema diff
  • Support operations field selection
  • To be added...

qiufen.config.js

// eslint-disable-next-line @typescript-eslint/no-require-imports
const Mock = require('mockjs')

const { Random } = Mock

module.exports = {
  port: 5632,
  // Local schema file path
  localSchemaFile: './src/graphql/generated/schema.graphql',
  // "remote" | "local". When the remote gateway  fails, you are advised to set it to "local" and specify the path of the local schema file.
  schemaPolicy: 'remote',
  endpoint: {
    url: 'http://demo-address/graphql',
  },
  requestHeaders: {
    /** token */
    authorization:
      '++mcE48DJOpTMK1/+',
  },
  openGrouped: true,
  mock: {
    /** Whether all operations are mocking --> default-value: true */
    openAllOperationsMocking: false,
    /** operation-based need mocking */
    operations: {
      query: [],
      mutation: [],
      subscription: [],
    },
    /** mocks */
    scalarMap: {
      Int: () => Random.integer(0, 100),
      String: () => Random.ctitle(2, 4),
      ID: () => Random.id(),
      Boolean: () => Random.boolean(),
      BigDecimal: () => Random.integer(0, 1000000),
      Float: () => Random.float(0, 100),
      Date: () => Random.date(),
      DateTime: () => Random.datetime(),
      Long: () => Random.integer(0, 10000),
      NumberOrBoolOrStringOrNull: () => null,
      NumberOrString: () => null,
      Object: () => ({}),
    },
    resolvers: {
      Query: {
        /* Custom field interface return */
        // ListTaskBoardName: () => {
        //   return [
        //     {
        //       commodityNa3me: "111111111",
        //       commoditySpec2OptionName: "争11232131231212果",
        //       commodityType4Name: "样情",
        //       completedQuan4tity: "府委产",
        //       create4By: "火传离那",
        //     },
        //   ]
        // },
      },
    },
  },
}
1.6.3

2 years ago

1.5.4

2 years ago

1.6.2

2 years ago

1.5.3

2 years ago

1.6.1

2 years ago

1.5.2

2 years ago

1.6.0

2 years ago

1.5.1

2 years ago

1.5.0

2 years ago

1.4.6

2 years ago

1.4.8

2 years ago

1.4.7

2 years ago

1.4.5

2 years ago

1.2.0

2 years ago

1.4.4

2 years ago

1.1.7

2 years ago

1.4.3

2 years ago

1.4.2

2 years ago

1.4.1

2 years ago

1.3.2

2 years ago

1.4.0

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.2.1

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago