{
  "id": "task_libraries:graphql/javascript",
  "path": "/exapedia/javascript-graphql-libraries",
  "template": {
    "id": "task_libraries",
    "version": 4
  },
  "title": "JavaScript GraphQL libraries",
  "answer": [
    {
      "t": "text",
      "text": "JavaScript GraphQL libraries define a schema for an API and execute GraphQL operations against it. A server library accepts each request over HTTP or WebSocket, then validates and runs the operation through the schema's resolvers. These libraries serve the APIs behind web and mobile apps, partner integrations, and AI agents that query structured data."
    }
  ],
  "breadcrumb": [
    {
      "label": "Tools"
    },
    {
      "label": "JavaScript GraphQL libraries"
    }
  ],
  "sections": [
    {
      "id": "libraries_popularity",
      "anchor": "popularity",
      "heading": "Popularity",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "Monthly downloads",
            "Stars",
            "Last release",
            "License"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#graphql-js",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F125"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F126"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F132"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F129"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F127"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#graphql-tools-schema",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F142"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F143"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F151"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F146"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F144"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#graphql-ws",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F161"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F162"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F170"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F165"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F163"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#envelop-core",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F180"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F181"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F189"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F184"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F182"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#apollo-server",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F199"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F200"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F206"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F203"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F201"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#graphql-yoga",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F216"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F217"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F223"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F220"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F218"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#graphql-http",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F233"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F234"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F242"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F237"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F235"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#mercurius",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F252"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F253"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F259"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F256"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F254"
                }
              ]
            ]
          ],
          "variant": "pop",
          "caption": [
            {
              "t": "text",
              "text": "Downloads: "
            },
            {
              "t": "text",
              "text": "npm"
            },
            {
              "t": "text",
              "text": ", last thirty days. Stars and releases: GitHub. Amber: no release in over a year."
            }
          ]
        }
      ],
      "note": [
        {
          "t": "link",
          "href": "#graphql-js",
          "label": [
            {
              "t": "fact",
              "fact": "F125"
            }
          ]
        },
        {
          "t": "text",
          "text": " has the most monthly downloads in this comparison, at "
        },
        {
          "t": "fact",
          "fact": "F126"
        },
        {
          "t": "text",
          "text": "."
        }
      ]
    },
    {
      "id": "libraries_capabilities",
      "anchor": "capabilities",
      "heading": "Capabilities",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "HTTP request handler",
            "Subscription transport",
            "SDL schema building"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#graphql-js",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F125"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F133"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F134"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F135"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#graphql-tools-schema",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F142"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F152"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F153"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F154"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#graphql-ws",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F161"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F171"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F172"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F173"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#envelop-core",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F180"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F190"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F191"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F192"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#apollo-server",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F199"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F207"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F208"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F209"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#graphql-yoga",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F216"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F224"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F225"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F226"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#graphql-http",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F233"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F243"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F244"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F245"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#mercurius",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F252"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F260"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F261"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F262"
                }
              ]
            ]
          ],
          "variant": "cap"
        }
      ]
    },
    {
      "id": "libraries_entries",
      "anchor": "libraries",
      "heading": "Libraries",
      "blocks": [
        {
          "b": "entry",
          "anchor": "graphql-js",
          "name": [
            {
              "t": "fact",
              "fact": "F125"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/graphql/graphql-js"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/graphql"
            },
            {
              "label": "Docs",
              "href": "https://www.graphql-js.org/api-v17/graphql/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F11"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F126"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F132"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F128"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F127"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://www.graphql-js.org/api-v17/graphql/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F125"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F12"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F13"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F14"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F15"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F16"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F17"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F18"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F19"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F140"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F141"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/keystonejs/keystone",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F140"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "typescript",
              "code": "export function makeContextQueryFn(\n  schema: GraphQLSchema,\n  operation: 'query' | 'mutation',\n  field: GraphQLField<any, unknown>\n) {\n  const { argumentNodes, variableDefinitions } = getVariablesForGraphQLField(field)\n  const rootName = getRootTypeName(field.type)\n  const exec = async (args: Record<string, any>, query: string, context: KeystoneContext) => {\n    const selectionSet = (\n      parse(`fragment x on ${rootName} {${query}}`).definitions[0] as FragmentDefinitionNode\n    ).selectionSet\n\n    const document: DocumentNode = {\n      kind: Kind.DOCUMENT,\n      definitions: [\n        {\n          kind: Kind.OPERATION_DEFINITION,\n          // OperationTypeNode is an ts enum where the values are 'query' | 'mutation' | 'subscription'\n          operation: operation as OperationTypeNode,\n          selectionSet: {\n            kind: Kind.SELECTION_SET,\n            selections: [\n              {\n                kind: Kind.FIELD,\n                name: { kind: Kind.NAME, value: field.name },\n                arguments: argumentNodes,\n                selectionSet: selectionSet,\n              },\n            ],\n          },\n          variableDefinitions,\n        },\n      ],\n    }\n\n    const validationErrors = validate(schema, document)\n\n    if (validationErrors.length > 0) {\n      throw validationErrors[0]\n    }\n\n    const result = await execute({\n      schema,\n      document,\n      contextValue: context,\n      variableValues: Object.fromEntries(\n        // GraphQL for some reason decides to make undefined values in args\n        // skip defaulting for some reason\n        // this ofc doesn't technically fully fix it (bc nested things)\n        // but for the cases where we care, it does\n        Object.entries(args).filter(([, val]) => val !== undefined)\n      ),\n      rootValue: {},\n    })\n    if (result.errors?.length) {\n      throw result.errors[0]\n    }\n    return result.data![field.name]\n  }\n\n  return (\n    _args: {\n      query?: string\n    } & Record<string, unknown> = {}, // WARNING: sometimes this is undefined somewhere\n    context: KeystoneContext\n  ) => {\n    const { query, ...args } = _args\n    return exec(args, query ?? 'id', context) as Promise<any>\n  }\n}\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/keystonejs/keystone/blob/3101ebcf7f1e24db30a6fbf63f2d1ae9fdd20aaa/packages/core/src/lib/context/graphql.ts#L272-L341",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F139"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=TypeScript%20applications%20using%20graphql%20to%20build%20GraphQL%20schemas%2C%20validate%20requests%2C%20execute%20operations%20and%20integrate%20server%20hosts&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F125"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "typescript",
              "code": "import { buildSchema, graphql } from 'graphql';\n\nconst schema = buildSchema('type Query { hello: String }');\nconst result = await graphql({ schema, source: '{ hello }', rootValue: { hello: () => 'world' } });\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://www.graphql-js.org/api-v17/graphql/",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F130"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "graphql-tools-schema",
          "name": [
            {
              "t": "fact",
              "fact": "F142"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/ardatan/graphql-tools"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/@graphql-tools/schema"
            },
            {
              "label": "Docs",
              "href": "https://the-guild.dev/graphql/tools/docs/generate-schema"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F269"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F143"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F151"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F145"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F144"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://the-guild.dev/graphql/tools/docs/generate-schema",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F142"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F270"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F271"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F272"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F273"
                }
              ]
            }
          ],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F159"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F160"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/nestjs/graphql",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F159"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "javascript",
              "code": "async generateSchema<T extends GqlModuleOptions>(\n  options: T = { typeDefs: [] } as T,\n): Promise<GraphQLSchema> {\n  if (options.directiveResolvers) {\n    this.logger.warn(\n      'The \"directiveResolvers\" option is ignored (it has had no effect since v9.2.0): the directive resolvers passed through it are never called. Apply the directives with \"transformSchema\" instead (for example, with \"mapSchema()\" from \"@graphql-tools/utils\").',\n    );\n  }\n  const resolvers = this.resolversExplorerService.explore();\n  const rawResolvers = extend(\n    this.scalarsExplorerService.explore(),\n    resolvers,\n  );\n\n  const typesResolvers = options.transformResolvers\n    ? await options.transformResolvers(rawResolvers)\n    : rawResolvers;\n  /**\n   * Merge field by field, so that an entry of the \"resolvers\" option does\n   * not replace the field resolvers discovered for the same type\n   */\n  const executableResolvers: IResolvers = mergeResolvers(\n    [typesResolvers, options.resolvers].flat(),\n  );\n\n  const transformSchema = async (schema: GraphQLSchema) =>\n    options.transformSchema ? await options.transformSchema(schema) : schema;\n\n  if (options.autoSchemaFile) {\n    const autoGeneratedSchema: GraphQLSchema =\n      await this.gqlSchemaBuilder.build(\n        options.autoSchemaFile,\n        options,\n        this.resolversExplorerService.getAllCtors(),\n      );\n    const executableSchema = makeExecutableSchema({\n      resolvers: executableResolvers,\n      typeDefs: gql`\n        ${printSchema(autoGeneratedSchema)}\n      `,\n      resolverValidationOptions: {\n        ...(options.resolverValidationOptions || {}),\n        requireResolversForResolveType: 'ignore',\n      },\n      inheritResolversFromInterfaces: options.inheritResolversFromInterfaces,\n    });\n    let schema = options.schema\n      ? mergeSchemas({\n          schemas: [options.schema, executableSchema],\n        })\n      : executableSchema;\n\n    const autoGeneratedSchemaConfig = autoGeneratedSchema.toConfig();\n    const schemaConfig = this.overrideOrExtendResolvers(\n      schema.toConfig(),\n      autoGeneratedSchemaConfig,\n      executableSchema,\n      executableResolvers,\n      options.buildSchemaOptions?.fieldMiddleware ?? [],\n    );\n\n    schema = new GraphQLSchema(schemaConfig);\n    schema = await transformSchema(schema);\n    schema = options.sortSchema ? lexicographicSortSchema(schema) : schema;\n    return schema;\n  }\n  if (this.isEmptyValue(options.typeDefs)) {\n    const schema = await transformSchema(options.schema);\n    return schema;\n  }\n  const executableSchemaConfig = {\n    resolvers: executableResolvers,\n    typeDefs: gql`\n      ${options.typeDefs}\n    `,\n    resolverValidationOptions: options.resolverValidationOptions,\n    inheritResolversFromInterfaces: options.inheritResolversFromInterfaces,\n  };\n  /**\n   * Merge the type definitions themselves (rather than a schema made\n   * executable from them) into the \"schema\" option, so that a scalar or an\n   * enum that both declare keeps the implementation of the \"schema\" option,\n   * unless one is registered on the Nest side\n   */\n  let schema = options.schema\n    ? mergeSchemas({\n        schemas: [options.schema],\n        ...executableSchemaConfig,\n      })\n    : makeExecutableSchema(executableSchemaConfig);\n\n  if (options.inheritResolversFromInterfaces) {\n    inheritResolversFromInterfaces(\n      schema,\n      options.schema\n        ? mergeResolvers([\n            getResolversFromSchema(options.schema),\n            executableResolvers,\n          ])\n        : executableResolvers,\n    );\n  }\n  removeTempField(schema);\n  schema = await transformSchema(schema);\n  schema = options.sortSchema ? lexicographicSortSchema(schema) : schema;\n  return schema;\n}\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/nestjs/graphql/blob/c36721932e6bd2114ab3c15779ad870dcd9703cd/packages/graphql/lib/graphql.factory.ts#L42-L148",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F158"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=%40graphql-tools/schema%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F142"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "javascript",
              "code": "import { makeExecutableSchema } from '@graphql-tools/schema';\n\nconst schema = makeExecutableSchema({\n  typeDefs: 'type Query { hello: String }',\n  resolvers: { Query: { hello: () => 'world' } },\n});\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://the-guild.dev/graphql/tools/docs/generate-schema",
                  "label": [
                    {
                      "t": "text",
                      "text": "generate-schema"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F147"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "graphql-ws",
          "name": [
            {
              "t": "fact",
              "fact": "F161"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/enisdenjo/graphql-ws"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/graphql-ws"
            },
            {
              "label": "Docs",
              "href": "https://github.com/enisdenjo/graphql-ws/blob/master/README.md"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F274"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F162"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F170"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F164"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F163"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/enisdenjo/graphql-ws/blob/master/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F161"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F275"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F276"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F277"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F278"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F178"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F179"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/prisma/prisma-examples",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F178"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "javascript",
              "code": "async function start() {\n  /** Create WS Server */\n  const wsServer = new WebSocketServer({\n    server: httpServer,\n    path: '/graphql',\n  })\n\n  /** hand-in created schema and have the WS Server start listening */\n  const serverCleanup = useServer({ schema, context }, wsServer)\n\n  const server = new ApolloServer<Context>({\n    schema,\n    plugins: [\n      ApolloServerPluginDrainHttpServer({ httpServer }),\n      {\n        async serverWillStart() {\n          return {\n            async drainServer() {\n              await serverCleanup.dispose()\n            },\n          }\n        },\n      },\n    ],\n  })\n\n  await server.start()\n  app.use('/graphql', cors<cors.CorsRequest>(), express.json(), expressMiddleware(server, { context: async () => context }));\n\n  httpServer.listen(PORT, () => {\n    console.log(`🚀 Server ready at http://localhost:${PORT}/graphql`)\n    console.log(`⏰ Subscriptions ready at http://localhost:${PORT}/graphql`)\n    console.log(\n      `⭐️ See sample queries: http://pris.ly/e/ts/graphql-subscriptions#using-the-graphql-api`,\n    )\n  })\n}\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/prisma/prisma-examples/blob/45d6bf6193c66bc869240df90c75b2e4b45d008f/orm/graphql-subscriptions/src/server.ts",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F177"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=graphql-ws%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F161"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "javascript",
              "code": "import { GraphQLObjectType, GraphQLSchema, GraphQLString } from \"graphql\";\nimport { WebSocketServer } from \"ws\";\nimport { useServer } from \"graphql-ws/use/ws\";\nconst schema = new GraphQLSchema({ query: new GraphQLObjectType({ name: \"Query\", fields: { hello: { type: GraphQLString, resolve: () => \"Hello\" } } }) });\nuseServer({ schema }, new WebSocketServer({ port: 4000 }));\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://registry.npmjs.org/graphql-ws/latest",
                  "label": [
                    {
                      "t": "text",
                      "text": "ws.ts"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F166"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "envelop-core",
          "name": [
            {
              "t": "fact",
              "fact": "F180"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/graphql-hive/graphql-yoga"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/@envelop/core"
            },
            {
              "label": "Docs",
              "href": "https://the-guild.dev/graphql/envelop/docs/getting-started"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F279"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F181"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F189"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F183"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F182"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://the-guild.dev/graphql/envelop/docs/getting-started",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F180"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F280"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F281"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F282"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F283"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F197"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F198"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/graphile/crystal",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F197"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "javascript",
              "code": "async function getExecutionConfig(ctx) {\n          const config = await originalGetExecutionConfig.call(this, ctx);\n          const getEnveloped = envelop({\n            plugins: [\n              // PERF: memoize argument if it makes any difference\n              useEngine({\n                ...graphql,\n                execute: config.execute,\n                subscribe: config.subscribe,\n                specifiedRules: event.validationRules,\n              }),\n              useSchema(config.schema),\n              useEnvelop(userGetEnveloped),\n            ],\n          });\n          const {\n            schema,\n            execute,\n            subscribe,\n            contextFactory,\n            parse: envelopedParse,\n            validate: envelopedValidate,\n          } = getEnveloped(ctx);\n          const parseAndValidate = (query: string) => {\n            const source = new graphql.Source(query, \"GraphQL HTTP Request\");\n            let document;\n            try {\n              document = envelopedParse(source);\n            } catch (e) {\n              return { errors: [e] };\n            }\n            const errors = envelopedValidate(schema, document);\n            return errors.length ? { errors } : { document };\n          };\n\n          return {\n            ...config,\n            contextValue: contextFactory(ctx),\n            schema,\n            execute,\n            subscribe,\n            parseAndValidate,\n          };\n        }\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/graphile/crystal/blob/b3f732391cc2a32d547fb0fdf708b2622a512e01/grafast/grafserv/src/envelop/index.ts#L44-L87",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F196"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=%40envelop/core%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F180"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "javascript",
              "code": "import * as graphql from 'graphql';\nimport { envelop, useEngine, useSchema } from '@envelop/core';\n\nconst getEnveloped = envelop({ plugins: [\n  useEngine(graphql),\n  useSchema(graphql.buildSchema('type Query { hello: String }')),\n] });\nconst { schema, parse, execute, contextFactory } = getEnveloped();\nconst result = await execute({ schema, document: parse('{ __typename }'), contextValue: await contextFactory() });\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://the-guild.dev/graphql/envelop/docs/getting-started",
                  "label": [
                    {
                      "t": "text",
                      "text": "getting-started"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F185"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "apollo-server",
          "name": [
            {
              "t": "fact",
              "fact": "F199"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/apollographql/apollo-server"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/@apollo/server"
            },
            {
              "label": "Docs",
              "href": "https://www.apollographql.com/docs/apollo-server/api/apollo-server"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F37"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F200"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F206"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F202"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F201"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://www.apollographql.com/docs/apollo-server/api/apollo-server",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F199"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F38"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F39"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F40"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F41"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F42"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F43"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F44"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F45"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F214"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F215"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/nestjs/graphql",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F214"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "typescript",
              "code": "protected async registerExpress(\n  options: T,\n  { preStartHook }: { preStartHook?: () => void } = {},\n) {\n  const { expressMiddleware } = await loadPackage(\n    '@as-integrations/express5',\n    'GraphQLModule',\n    () => import('@as-integrations/express5'),\n  );\n\n  const { path, typeDefs, resolvers, schema } = options;\n\n  const httpAdapter = this.httpAdapterHost.httpAdapter;\n\n  // Workaround: the landing page requires body to be present\n  // otherwise, it shows the \"req.body is not set; this probably means you forgot to set up the json middleware before the Apollo Server middleware.\" error.\n  // The latest version of \"body-parser\" does not set the body if there is no payload.\n  // @see https://github.com/nestjs/graphql/issues/3451\n  // @see https://github.com/nestjs/nest/pull/14443\n  httpAdapter.use(path, (req: any, _: any, next: () => void) => {\n    req.body = req.body ?? {};\n    next();\n  });\n\n  const app = httpAdapter.getInstance();\n  const drainHttpServerPlugin = ApolloServerPluginDrainHttpServer({\n    httpServer: httpAdapter.getHttpServer(),\n  });\n\n  preStartHook?.();\n\n  const server = new ApolloServer({\n    typeDefs,\n    resolvers,\n    schema,\n    ...options,\n    plugins: [\n      ...(options.plugins ?? []),\n      drainHttpServerPlugin,\n      this.createRejectSubscriptionsPlugin(),\n    ],\n  });\n\n  await server.start();\n\n  // Register an exact route, as Nest does for its own routes (and as\n  // \"registerFastify\" does): \"app.use(path, ...)\" would also serve\n  // \"/graphql/<anything>\", out of reach of the middleware the application\n  // binds to \"path\" with \"MiddlewareConsumer#forRoutes({ path, method })\".\n  app.all(\n    path,\n    expressMiddleware(server, {\n      context: options.context,\n    }),\n  );\n\n  this.apolloServer = server;\n}\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/nestjs/graphql/blob/72e4116cde00e619b1021242aeacf91d8221b546/packages/apollo/lib/drivers/apollo-base.driver.ts#L311-L368",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F213"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=TypeScript%20applications%20using%20%40apollo/server%20to%20build%20GraphQL%20schemas%2C%20validate%20requests%2C%20execute%20operations%20and%20integrate%20server%20hosts&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F199"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "typescript",
              "code": "import { ApolloServer } from '@apollo/server';\n\nconst server = new ApolloServer({\n  typeDefs: 'type Query { hello: String }',\n  resolvers: { Query: { hello: () => 'world' } },\n});\nawait server.start();\nconst result = await server.executeOperation({ query: '{ hello }' });\nawait server.stop();\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://www.apollographql.com/docs/apollo-server/api/apollo-server",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F204"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "graphql-yoga",
          "name": [
            {
              "t": "fact",
              "fact": "F216"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/graphql-hive/graphql-yoga"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/graphql-yoga"
            },
            {
              "label": "Docs",
              "href": "https://github.com/graphql-hive/graphql-yoga/blob/237065ae3deda3abec58f69bcc58521652a77328/packages/graphql-yoga/README.md"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F63"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F217"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F223"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F219"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F218"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/graphql-hive/graphql-yoga/blob/237065ae3deda3abec58f69bcc58521652a77328/packages/graphql-yoga/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F216"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F64"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F65"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F66"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F67"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F68"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F69"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F70"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F71"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F231"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F232"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/redwoodjs/graphql",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F231"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "typescript",
              "code": "export const createGraphQLYoga = ({\n  healthCheckId,\n  loggerConfig,\n  context,\n  getCurrentUser,\n  onException,\n  generateGraphiQLHeader,\n  extraPlugins,\n  authDecoder,\n  cors,\n  services,\n  sdls,\n  directives = [],\n  armorConfig,\n  allowedOperations,\n  allowIntrospection,\n  allowGraphiQL,\n  defaultError = 'Something went wrong.',\n  graphiQLEndpoint = '/graphql',\n  schemaOptions,\n  realtime,\n  trustedDocuments,\n  openTelemetryOptions,\n  includeScalars,\n}: GraphQLYogaOptions) => {\n  let schema: GraphQLSchema\n  let redwoodDirectivePlugins = [] as Plugin[]\n  const logger = loggerConfig.logger\n\n  const isDevEnv = process.env.NODE_ENV === 'development'\n\n  try {\n    // @NOTE: Directives are optional\n    const projectDirectives = makeDirectivesForPlugin(directives)\n\n    if (projectDirectives.length > 0) {\n      ;(redwoodDirectivePlugins as useRedwoodDirectiveReturn[]) =\n        projectDirectives.map((directive) =>\n          useRedwoodDirective(directive as DirectivePluginOptions),\n        )\n    }\n\n    // @NOTE: Subscriptions are optional and only work in the context of a server\n    let projectSubscriptions = [] as RedwoodSubscription[]\n\n    if (realtime?.subscriptions?.subscriptions) {\n      projectSubscriptions = makeSubscriptions(\n        realtime.subscriptions.subscriptions,\n      )\n    }\n\n    schema = makeMergedSchema({\n      sdls,\n      services,\n      directives: projectDirectives,\n      subscriptions: projectSubscriptions,\n      schemaOptions,\n      includeScalars,\n    })\n  } catch (e) {\n    logger.fatal(e as Error, '\\n ⚠️ GraphQL server crashed \\n')\n\n    if (onException) {\n      onException()\n    }\n\n    // Forcefully crash the graphql server\n    // so users know that a misconfiguration has happened\n    process.exit(1)\n  }\n\n  try {\n    // Important: Plugins are executed in order of their usage, and inject functionality serially,\n    // so the order here matters\n    const plugins: Plugin<any>[] = []\n\n    const { disableIntrospection } = configureGraphQLIntrospection({\n      allowIntrospection,\n    })\n\n    if (disableIntrospection) {\n      plugins.push(useDisableIntrospection())\n    }\n\n    // Custom Redwood plugins\n    plugins.push(useRedwoodAuthContext(getCurrentUser, authDecoder))\n    plugins.push(useRedwoodGlobalContextSetter())\n\n    if (context) {\n      plugins.push(useRedwoodPopulateContext(context))\n    }\n\n    // Custom Redwood plugins\n    plugins.push(...redwoodDirectivePlugins)\n\n    // Custom Redwood OpenTelemetry plugin\n    if (openTelemetryOptions !== undefined) {\n      plugins.push(useRedwoodOpenTelemetry(openTelemetryOptions))\n    }\n\n    // Secure the GraphQL server\n    plugins.push(useArmor(logger, armorConfig))\n\n    // Only allow execution of specific operation types\n    const defaultAllowedOperations = [\n      OperationTypeNode.QUERY,\n      OperationTypeNode.MUTATION,\n    ]\n\n    // allow subscriptions if using them (unless you override)\n    if (realtime?.subscriptions?.subscriptions) {\n      defaultAllowedOperations.push(OperationTypeNode.SUBSCRIPTION)\n    }\n\n    plugins.push(\n      useFilterAllowedOperations(allowedOperations || defaultAllowedOperations),\n    )\n\n    if (trustedDocuments && !trustedDocuments.disabled) {\n      plugins.push(useRedwoodTrustedDocuments(trustedDocuments))\n    }\n\n    // App-defined plugins\n    if (extraPlugins && extraPlugins.length > 0) {\n      plugins.push(...extraPlugins)\n    }\n\n    plugins.push(useRedwoodError(logger))\n\n    plugins.push(\n      useReadinessCheck({\n        endpoint: graphiQLEndpoint + '/readiness',\n        check: async ({ request }) => {\n          try {\n            // if we can reach the health check endpoint ...\n            const response = await yoga.fetch(\n              new URL(graphiQLEndpoint + '/health', request.url),\n            )\n\n            const expectedHealthCheckId = healthCheckId || 'yoga'\n\n            // ... and the health check id's match the request and response's\n            const status =\n              response.headers.get('x-yoga-id') === expectedHealthCheckId &&\n              request.headers.get('x-yoga-id') === expectedHealthCheckId\n\n            // then we're good to go (or not)\n            return status\n          } catch (err) {\n            logger.error(err)\n            return false\n          }\n        },\n      }),\n    )\n\n    // Must be \"last\" in plugin chain, but before error masking\n    // so can process any data added to results and extensions\n    plugins.push(useRedwoodLogger(loggerConfig))\n\n    const yoga = createYoga({\n      id: healthCheckId,\n      landingPage: isDevEnv,\n      schema,\n      plugins,\n      maskedErrors: {\n        errorMessage: defaultError,\n        isDev: isDevEnv,\n      },\n      logging: logger,\n      healthCheckEndpoint: graphiQLEndpoint + '/health',\n      graphqlEndpoint: graphiQLEndpoint,\n      graphiql: configureGraphiQLPlayground({\n        allowGraphiQL,\n        generateGraphiQLHeader,\n      }),\n      cors: (request: Request) => {\n        const requestOrigin = request.headers.get('origin')\n        return mapRwCorsOptionsToYoga(cors, requestOrigin)\n      },\n    })\n\n    return { yoga, logger }\n  } catch (e) {\n    if (onException) {\n      onException()\n    }\n    throw e\n  }\n}\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/redwoodjs/graphql/blob/a7852fb92d0e4ac2bcce1d9a755717ba6cf53ffd/packages/graphql-server/src/createGraphQLYoga.ts#L32-L221",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F230"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=TypeScript%20applications%20using%20graphql-yoga%20to%20build%20GraphQL%20schemas%2C%20validate%20requests%2C%20execute%20operations%20and%20integrate%20server%20hosts&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F216"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "typescript",
              "code": "import { createYoga, createSchema } from 'graphql-yoga';\n\nconst yoga = createYoga({ schema: createSchema({\n  typeDefs: 'type Query { hello: String }',\n  resolvers: { Query: { hello: () => 'world' } },\n}) });\nconst response = await yoga.fetch('http://localhost/graphql?query={hello}');\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/graphql-hive/graphql-yoga/blob/main/packages/graphql-yoga/src/server.ts",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F221"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "graphql-http",
          "name": [
            {
              "t": "fact",
              "fact": "F233"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/graphql/graphql-http"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/graphql-http"
            },
            {
              "label": "Docs",
              "href": "https://github.com/graphql/graphql-http/blob/main/README.md"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F284"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F234"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F242"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F236"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F235"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/graphql/graphql-http/blob/main/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F233"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F285"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F286"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F287"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F288"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F250"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F251"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/marmelab/json-graphql-server",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F250"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "javascript",
              "code": "(data: Data) => {\n    const graphqlHandler = createHandler({\n        schema: schemaBuilder(data),\n    });\n\n    const expressMiddleware: Handler = (req, res, next) => {\n        if (req.is('application/json')) {\n            return graphqlHandler(req, res, next);\n        }\n\n        return graphiqlHandler(req, res, next);\n    };\n\n    return expressMiddleware;\n}\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/marmelab/json-graphql-server/blob/0affaa2bebdbd0053a4aeb2ae20d2680162712ad/src/jsonGraphqlExpress.ts#L51-L65",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F249"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=graphql-http%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F233"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "javascript",
              "code": "import express from 'express';\nimport { buildSchema } from 'graphql';\nimport { createHandler } from 'graphql-http/lib/use/express';\n\nconst schema = buildSchema('type Query { hello: String }');\nconst app = express();\napp.all('/graphql', createHandler({ schema, rootValue: { hello: () => 'world' } }));\napp.listen(4000);\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/graphql/graphql-http/blob/main/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F238"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "mercurius",
          "name": [
            {
              "t": "fact",
              "fact": "F252"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/mercurius-js/mercurius"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/mercurius"
            },
            {
              "label": "Docs",
              "href": "https://github.com/mercurius-js/mercurius/blob/master/docs/api/options.md"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F89"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F253"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F259"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F255"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F254"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/mercurius-js/mercurius/blob/master/docs/api/options.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F252"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F90"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F91"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F92"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F93"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F94"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F95"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F96"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F97"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F267"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F268"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/marcoturi/fastify-boilerplate",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F267"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "typescript",
              "code": "export default async function findUsersResolver(fastify: FastifyRouteInstance) {\n  fastify.graphql.defineResolvers({\n    Query: {\n      findUsers: async (_, args) => {\n        const result = await fastify.queryBus.execute(findUsersQuery(validateArgs(args)));\n        return mapPage(result, fastify.diContainer.cradle.userMapper.toResponse);\n      },\n    },\n  });\n}\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/marcoturi/fastify-boilerplate/blob/db4f86d5691da005e5619e3628e7012b33df9634/src/modules/user/queries/find-users/find-users.resolver.ts#L8-L17",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F266"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=TypeScript%20applications%20using%20mercurius%20to%20build%20GraphQL%20schemas%2C%20validate%20requests%2C%20execute%20operations%20and%20integrate%20server%20hosts&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F252"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "typescript",
              "code": "import Fastify from 'fastify';\nimport mercurius from 'mercurius';\n\nconst app = Fastify();\napp.register(mercurius, {\n  schema: 'type Query { hello: String }',\n  resolvers: { Query: { hello: () => 'world' } },\n});\nawait app.ready();\nconst result = await app.graphql('{ hello }');\nawait app.close();\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/mercurius-js/mercurius/blob/master/docs/api/options.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F257"
            }
          ]
        }
      ]
    }
  ],
  "questions": [
    {
      "q": "Which JavaScript GraphQL library should I use?",
      "a": [
        {
          "t": "text",
          "text": "GraphQL.js supplies the schema and execution runtime that the server libraries build on. For a full HTTP server, Apollo Server and GraphQL Yoga wrap that runtime with request handling and plugins. Mercurius fits an app that already runs on Fastify."
        }
      ]
    },
    {
      "q": "What is Apollo Server?",
      "a": [
        {
          "t": "text",
          "text": "Apollo Server is a GraphQL server for Node.js with a standalone web server that handles CORS and body parsing. A framework integration replaces the standalone server when an app needs custom middleware or other endpoints."
        }
      ]
    },
    {
      "q": "What does GraphQL Tools do?",
      "a": [
        {
          "t": "text",
          "text": "The @graphql-tools/schema package builds an executable GraphQL.js schema from type definitions in the GraphQL schema language and a resolver object, through the makeExecutableSchema function."
        }
      ]
    },
    {
      "q": "What is graphql-ws?",
      "a": [
        {
          "t": "text",
          "text": "graphql-ws implements the GraphQL over WebSocket Protocol as both a server and a client. The server and the client both need graphql-ws, because it does not work with the deprecated subscriptions-transport-ws protocol."
        }
      ]
    },
    {
      "q": "GraphQL Yoga vs Apollo Server: which should I use?",
      "a": [
        {
          "t": "text",
          "text": "GraphQL Yoga serves GraphQL through a Fetch handler that runs in Node.js, serverless, and worker environments, with subscriptions over Server-Sent Events built in. Apollo Server includes a standalone HTTP server and needs graphql-ws added for subscriptions in a non-federated graph."
        }
      ]
    },
    {
      "q": "How do Apollo Server subscriptions work?",
      "a": [
        {
          "t": "text",
          "text": "Apollo Server does not carry subscriptions on its own. A non-federated graph adds the graphql-ws library to the server for the subscription transport."
        }
      ]
    }
  ],
  "facts": {
    "F1": {
      "label": "Library name, graphql",
      "display": "GraphQL.js",
      "asOf": "2026-11-17"
    },
    "F2": {
      "label": "Monthly downloads, graphql",
      "display": "270.5M",
      "asOf": "2026-11-16"
    },
    "F3": {
      "label": "License, graphql",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F4": {
      "label": "Package release, graphql",
      "display": "17.1.0",
      "asOf": "2026-11-17"
    },
    "F5": {
      "label": "Undated package release, graphql",
      "display": "v17.1.0",
      "asOf": "2026-11-17"
    },
    "F6": {
      "label": "Repository stars, graphql",
      "display": "20.3K",
      "asOf": "2026-11-17"
    },
    "F7": {
      "label": "Executes queries, graphql",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F8": {
      "label": "Validates operations, graphql",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F9": {
      "label": "Handles subscriptions, graphql",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F10": {
      "label": "Install, graphql",
      "display": "npm install graphql",
      "asOf": "2026-11-17"
    },
    "F11": {
      "label": "What it does, graphql",
      "display": "Builds schemas and executes GraphQL operations as the reference JavaScript runtime.",
      "asOf": "2026-11-17"
    },
    "F12": {
      "label": "strengths lead, graphql",
      "display": "Validates queries before execution",
      "asOf": "2026-11-17"
    },
    "F13": {
      "label": "strengths, graphql",
      "display": "The graphql function validates the query before running its resolvers.",
      "asOf": "2026-11-17"
    },
    "F14": {
      "label": "strengths lead, graphql",
      "display": "Builds schemas directly in code",
      "asOf": "2026-11-17"
    },
    "F15": {
      "label": "strengths, graphql",
      "display": "Define object types and field resolvers with the schema constructors.",
      "asOf": "2026-11-17"
    },
    "F16": {
      "label": "limitations lead, graphql",
      "display": "Subscriptions need a transport layer",
      "asOf": "2026-11-17"
    },
    "F17": {
      "label": "limitations, graphql",
      "display": "Connect subscription execution to an event system and network transport.",
      "asOf": "2026-11-17"
    },
    "F18": {
      "label": "limitations lead, graphql",
      "display": "Custom pipelines need validation",
      "asOf": "2026-11-17"
    },
    "F19": {
      "label": "limitations, graphql",
      "display": "Run operation validation separately when building a low-level execution pipeline.",
      "asOf": "2026-11-17"
    },
    "F20": {
      "label": "Quickstart, graphql",
      "display": "import {\n  graphql,\n  GraphQLSchema,\n  GraphQLObjectType,\n  GraphQLString,\n} from 'graphql';\n\nvar schema = new GraphQLSchema({\n  query: new GraphQLObjectType({\n    name: 'RootQueryType',\n    fields: {\n      hello: {\n        type: GraphQLString,\n        resolve() {\n          return 'world';\n        },\n      },\n    },\n  }),\n});\n\nvar source = '{ hello }';\n\ngraphql({ schema, source }).then((result) => {\n  // Prints\n  // {\n  //   data: { hello: \"world\" }\n  // }\n  console.log(result);\n});\n",
      "asOf": "2026-11-17"
    },
    "F21": {
      "label": "Project function, graphql",
      "display": "export function makeContextQueryFn(\n  schema: GraphQLSchema,\n  operation: 'query' | 'mutation',\n  field: GraphQLField<any, unknown>\n) {\n  const { argumentNodes, variableDefinitions } = getVariablesForGraphQLField(field)\n  const rootName = getRootTypeName(field.type)\n  const exec = async (args: Record<string, any>, query: string, context: KeystoneContext) => {\n    const selectionSet = (\n      parse(`fragment x on ${rootName} {${query}}`).definitions[0] as FragmentDefinitionNode\n    ).selectionSet\n\n    const document: DocumentNode = {\n      kind: Kind.DOCUMENT,\n      definitions: [\n        {\n          kind: Kind.OPERATION_DEFINITION,\n          // OperationTypeNode is an ts enum where the values are 'query' | 'mutation' | 'subscription'\n          operation: operation as OperationTypeNode,\n          selectionSet: {\n            kind: Kind.SELECTION_SET,\n            selections: [\n              {\n                kind: Kind.FIELD,\n                name: { kind: Kind.NAME, value: field.name },\n                arguments: argumentNodes,\n                selectionSet: selectionSet,\n              },\n            ],\n          },\n          variableDefinitions,\n        },\n      ],\n    }\n\n    const validationErrors = validate(schema, document)\n\n    if (validationErrors.length > 0) {\n      throw validationErrors[0]\n    }\n\n    const result = await execute({\n      schema,\n      document,\n      contextValue: context,\n      variableValues: Object.fromEntries(\n        // GraphQL for some reason decides to make undefined values in args\n        // skip defaulting for some reason\n        // this ofc doesn't technically fully fix it (bc nested things)\n        // but for the cases where we care, it does\n        Object.entries(args).filter(([, val]) => val !== undefined)\n      ),\n      rootValue: {},\n    })\n    if (result.errors?.length) {\n      throw result.errors[0]\n    }\n    return result.data![field.name]\n  }\n\n  return (\n    _args: {\n      query?: string\n    } & Record<string, unknown> = {}, // WARNING: sometimes this is undefined somewhere\n    context: KeystoneContext\n  ) => {\n    const { query, ...args } = _args\n    return exec(args, query ?? 'id', context) as Promise<any>\n  }\n}\n",
      "asOf": "2026-11-17"
    },
    "F22": {
      "label": "Project function reference, graphql",
      "display": "graphql.ts · makeContextQueryFn()",
      "asOf": "2026-11-17"
    },
    "F23": {
      "label": "Project repository, graphql",
      "display": "keystonejs/keystone",
      "asOf": "2026-11-17"
    },
    "F24": {
      "label": "Project stars, keystonejs/keystone",
      "display": "10.0K",
      "asOf": "2026-11-17"
    },
    "F25": {
      "label": "Project push date, keystonejs/keystone",
      "display": "Nov 2026",
      "asOf": "2026-11-17"
    },
    "F26": {
      "label": "Library name, @apollo/server",
      "display": "Apollo Server",
      "asOf": "2026-11-17"
    },
    "F27": {
      "label": "Monthly downloads, @apollo/server",
      "display": "15.2M",
      "asOf": "2026-11-16"
    },
    "F28": {
      "label": "License, @apollo/server",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F29": {
      "label": "Package release, @apollo/server",
      "display": "5.5.2",
      "asOf": "2026-11-17"
    },
    "F30": {
      "label": "Undated package release, @apollo/server",
      "display": "v5.5.2",
      "asOf": "2026-11-17"
    },
    "F31": {
      "label": "Repository stars, @apollo/server",
      "display": "14.0K",
      "asOf": "2026-11-17"
    },
    "F32": {
      "label": "Executes queries, @apollo/server",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F33": {
      "label": "Validates operations, @apollo/server",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F34": {
      "label": "Serves HTTP, @apollo/server",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F35": {
      "label": "Handles subscriptions, @apollo/server",
      "display": "Via plugin",
      "asOf": "2026-11-17"
    },
    "F36": {
      "label": "Install, @apollo/server",
      "display": "npm install @apollo/server graphql@^16.11.0",
      "asOf": "2026-11-17"
    },
    "F37": {
      "label": "What it does, @apollo/server",
      "display": "Provides a GraphQL request pipeline with standalone and framework-integrated server options.",
      "asOf": "2026-11-17"
    },
    "F38": {
      "label": "strengths lead, @apollo/server",
      "display": "Includes a standalone HTTP server",
      "asOf": "2026-11-17"
    },
    "F39": {
      "label": "strengths, @apollo/server",
      "display": "Start a GraphQL endpoint with CORS and body parsing already handled.",
      "asOf": "2026-11-17"
    },
    "F40": {
      "label": "strengths lead, @apollo/server",
      "display": "Caches parsed and validated operations",
      "asOf": "2026-11-17"
    },
    "F41": {
      "label": "strengths, @apollo/server",
      "display": "Reuse validated documents across requests without caching their query results.",
      "asOf": "2026-11-17"
    },
    "F42": {
      "label": "limitations lead, @apollo/server",
      "display": "Standalone HTTP customization is limited",
      "asOf": "2026-11-17"
    },
    "F43": {
      "label": "limitations, @apollo/server",
      "display": "Use a framework integration for custom middleware, CORS, or other endpoints.",
      "asOf": "2026-11-17"
    },
    "F44": {
      "label": "limitations lead, @apollo/server",
      "display": "Subscriptions need an additional transport",
      "asOf": "2026-11-17"
    },
    "F45": {
      "label": "limitations, @apollo/server",
      "display": "Add graphql-ws for subscriptions in a non-federated graph.",
      "asOf": "2026-11-17"
    },
    "F46": {
      "label": "Quickstart, @apollo/server",
      "display": "import { ApolloServer } from '@apollo/server';\nimport { startStandaloneServer } from '@apollo/server/standalone';\n\n// The GraphQL schema\nconst typeDefs = `#graphql\n  type Query {\n    hello: String\n  }\n`;\n\n// A map of functions which return data for the schema.\nconst resolvers = {\n  Query: {\n    hello: () => 'world',\n  },\n};\n\nconst server = new ApolloServer({\n  typeDefs,\n  resolvers,\n});\n\nconst { url } = await startStandaloneServer(server);\nconsole.log(`🚀 Server ready at ${url}`);\n",
      "asOf": "2026-11-17"
    },
    "F47": {
      "label": "Project function, @apollo/server",
      "display": "protected async registerExpress(\n    options: T,\n    { preStartHook }: { preStartHook?: () => void } = {},\n  ) {\n    const { expressMiddleware } = await loadPackage(\n      '@as-integrations/express5',\n      'GraphQLModule',\n      () => import('@as-integrations/express5'),\n    );\n\n    const { path, typeDefs, resolvers, schema } = options;\n\n    const httpAdapter = this.httpAdapterHost.httpAdapter;\n\n    // Workaround: the landing page requires body to be present\n    // otherwise, it shows the \"req.body is not set; this probably means you forgot to set up the json middleware before the Apollo Server middleware.\" error.\n    // The latest version of \"body-parser\" does not set the body if there is no payload.\n    // @see https://github.com/nestjs/graphql/issues/3451\n    // @see https://github.com/nestjs/nest/pull/14443\n    httpAdapter.use(path, (req: any, _: any, next: () => void) => {\n      req.body = req.body ?? {};\n      next();\n    });\n\n    const app = httpAdapter.getInstance();\n    const drainHttpServerPlugin = ApolloServerPluginDrainHttpServer({\n      httpServer: httpAdapter.getHttpServer(),\n    });\n\n    preStartHook?.();\n\n    const server = new ApolloServer({\n      typeDefs,\n      resolvers,\n      schema,\n      ...options,\n      plugins: [\n        ...(options.plugins ?? []),\n        drainHttpServerPlugin,\n        this.createRejectSubscriptionsPlugin(),\n      ],\n    });\n\n    await server.start();\n\n    // Register an exact route, as Nest does for its own routes (and as\n    // \"registerFastify\" does): \"app.use(path, ...)\" would also serve\n    // \"/graphql/<anything>\", out of reach of the middleware the application\n    // binds to \"path\" with \"MiddlewareConsumer#forRoutes({ path, method })\".\n    app.all(\n      path,\n      expressMiddleware(server, {\n        context: options.context,\n      }),\n    );\n\n    this.apolloServer = server;\n  }\n",
      "asOf": "2026-11-17"
    },
    "F48": {
      "label": "Project function reference, @apollo/server",
      "display": "apollo-base.driver.ts · registerExpress()",
      "asOf": "2026-11-17"
    },
    "F49": {
      "label": "Project repository, @apollo/server",
      "display": "nestjs/graphql",
      "asOf": "2026-11-17"
    },
    "F50": {
      "label": "Project stars, nestjs/graphql",
      "display": "1.6K",
      "asOf": "2026-11-17"
    },
    "F51": {
      "label": "Project push date, nestjs/graphql",
      "display": "Nov 2026",
      "asOf": "2026-11-17"
    },
    "F52": {
      "label": "Library name, graphql-yoga",
      "display": "GraphQL Yoga",
      "asOf": "2026-11-17"
    },
    "F53": {
      "label": "Monthly downloads, graphql-yoga",
      "display": "11.1M",
      "asOf": "2026-11-16"
    },
    "F54": {
      "label": "License, graphql-yoga",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F55": {
      "label": "Package release, graphql-yoga",
      "display": "6.1.0",
      "asOf": "2026-11-17"
    },
    "F56": {
      "label": "Undated package release, graphql-yoga",
      "display": "v6.1.0",
      "asOf": "2026-11-17"
    },
    "F57": {
      "label": "Repository stars, graphql-yoga",
      "display": "8.5K",
      "asOf": "2026-11-17"
    },
    "F58": {
      "label": "Executes queries, graphql-yoga",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F59": {
      "label": "Validates operations, graphql-yoga",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F60": {
      "label": "Serves HTTP, graphql-yoga",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F61": {
      "label": "Handles subscriptions, graphql-yoga",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F62": {
      "label": "Install, graphql-yoga",
      "display": "npm install graphql-yoga graphql",
      "asOf": "2026-11-17"
    },
    "F63": {
      "label": "What it does, graphql-yoga",
      "display": "Serves GraphQL through a Fetch-based handler with built-in subscription transport.",
      "asOf": "2026-11-17"
    },
    "F64": {
      "label": "strengths lead, graphql-yoga",
      "display": "Includes subscriptions over server events",
      "asOf": "2026-11-17"
    },
    "F65": {
      "label": "strengths, graphql-yoga",
      "display": "Serve subscriptions through the built-in Server-Sent Events transport.",
      "asOf": "2026-11-17"
    },
    "F66": {
      "label": "strengths lead, graphql-yoga",
      "display": "Supports Fetch-based deployment hosts",
      "asOf": "2026-11-17"
    },
    "F67": {
      "label": "strengths, graphql-yoga",
      "display": "Use the Fetch handler across Node, serverless, and worker environments.",
      "asOf": "2026-11-17"
    },
    "F68": {
      "label": "limitations lead, graphql-yoga",
      "display": "WebSockets need an additional integration",
      "asOf": "2026-11-17"
    },
    "F69": {
      "label": "limitations, graphql-yoga",
      "display": "Add graphql-ws when clients require the WebSocket subscription protocol.",
      "asOf": "2026-11-17"
    },
    "F70": {
      "label": "limitations lead, graphql-yoga",
      "display": "Subscription clients must support SSE",
      "asOf": "2026-11-17"
    },
    "F71": {
      "label": "limitations, graphql-yoga",
      "display": "Use a compatible GraphQL-over-SSE client for the default subscription transport.",
      "asOf": "2026-11-17"
    },
    "F72": {
      "label": "Quickstart, graphql-yoga",
      "display": "import { createServer } from 'node:http'\nimport { createSchema, createYoga } from 'graphql-yoga'\n\nconst yoga = createYoga({\n  schema: createSchema({\n    typeDefs: /* GraphQL */ `\n      type Query {\n        hello: String\n      }\n    `,\n    resolvers: {\n      Query: {\n        hello: () => 'Hello from Yoga!'\n      }\n    }\n  })\n})\n\nconst server = createServer(yoga)\n\nserver.listen(4000, () => {\n  console.info('Server is running on http://localhost:4000/graphql')\n})\n",
      "asOf": "2026-11-17"
    },
    "F73": {
      "label": "Project function, graphql-yoga",
      "display": "export const createGraphQLYoga = ({\n  healthCheckId,\n  loggerConfig,\n  context,\n  getCurrentUser,\n  onException,\n  generateGraphiQLHeader,\n  extraPlugins,\n  authDecoder,\n  cors,\n  services,\n  sdls,\n  directives = [],\n  armorConfig,\n  allowedOperations,\n  allowIntrospection,\n  allowGraphiQL,\n  defaultError = 'Something went wrong.',\n  graphiQLEndpoint = '/graphql',\n  schemaOptions,\n  realtime,\n  trustedDocuments,\n  openTelemetryOptions,\n  includeScalars,\n}: GraphQLYogaOptions) => {\n  let schema: GraphQLSchema\n  let redwoodDirectivePlugins = [] as Plugin[]\n  const logger = loggerConfig.logger\n\n  const isDevEnv = process.env.NODE_ENV === 'development'\n\n  try {\n    // @NOTE: Directives are optional\n    const projectDirectives = makeDirectivesForPlugin(directives)\n\n    if (projectDirectives.length > 0) {\n      ;(redwoodDirectivePlugins as useRedwoodDirectiveReturn[]) =\n        projectDirectives.map((directive) =>\n          useRedwoodDirective(directive as DirectivePluginOptions),\n        )\n    }\n\n    // @NOTE: Subscriptions are optional and only work in the context of a server\n    let projectSubscriptions = [] as RedwoodSubscription[]\n\n    if (realtime?.subscriptions?.subscriptions) {\n      projectSubscriptions = makeSubscriptions(\n        realtime.subscriptions.subscriptions,\n      )\n    }\n\n    schema = makeMergedSchema({\n      sdls,\n      services,\n      directives: projectDirectives,\n      subscriptions: projectSubscriptions,\n      schemaOptions,\n      includeScalars,\n    })\n  } catch (e) {\n    logger.fatal(e as Error, '\\n ⚠️ GraphQL server crashed \\n')\n\n    if (onException) {\n      onException()\n    }\n\n    // Forcefully crash the graphql server\n    // so users know that a misconfiguration has happened\n    process.exit(1)\n  }\n\n  try {\n    // Important: Plugins are executed in order of their usage, and inject functionality serially,\n    // so the order here matters\n    const plugins: Plugin<any>[] = []\n\n    const { disableIntrospection } = configureGraphQLIntrospection({\n      allowIntrospection,\n    })\n\n    if (disableIntrospection) {\n      plugins.push(useDisableIntrospection())\n    }\n\n    // Custom Redwood plugins\n    plugins.push(useRedwoodAuthContext(getCurrentUser, authDecoder))\n    plugins.push(useRedwoodGlobalContextSetter())\n\n    if (context) {\n      plugins.push(useRedwoodPopulateContext(context))\n    }\n\n    // Custom Redwood plugins\n    plugins.push(...redwoodDirectivePlugins)\n\n    // Custom Redwood OpenTelemetry plugin\n    if (openTelemetryOptions !== undefined) {\n      plugins.push(useRedwoodOpenTelemetry(openTelemetryOptions))\n    }\n\n    // Secure the GraphQL server\n    plugins.push(useArmor(logger, armorConfig))\n\n    // Only allow execution of specific operation types\n    const defaultAllowedOperations = [\n      OperationTypeNode.QUERY,\n      OperationTypeNode.MUTATION,\n    ]\n\n    // allow subscriptions if using them (unless you override)\n    if (realtime?.subscriptions?.subscriptions) {\n      defaultAllowedOperations.push(OperationTypeNode.SUBSCRIPTION)\n    }\n\n    plugins.push(\n      useFilterAllowedOperations(allowedOperations || defaultAllowedOperations),\n    )\n\n    if (trustedDocuments && !trustedDocuments.disabled) {\n      plugins.push(useRedwoodTrustedDocuments(trustedDocuments))\n    }\n\n    // App-defined plugins\n    if (extraPlugins && extraPlugins.length > 0) {\n      plugins.push(...extraPlugins)\n    }\n\n    plugins.push(useRedwoodError(logger))\n\n    plugins.push(\n      useReadinessCheck({\n        endpoint: graphiQLEndpoint + '/readiness',\n        check: async ({ request }) => {\n          try {\n            // if we can reach the health check endpoint ...\n            const response = await yoga.fetch(\n              new URL(graphiQLEndpoint + '/health', request.url),\n            )\n\n            const expectedHealthCheckId = healthCheckId || 'yoga'\n\n            // ... and the health check id's match the request and response's\n            const status =\n              response.headers.get('x-yoga-id') === expectedHealthCheckId &&\n              request.headers.get('x-yoga-id') === expectedHealthCheckId\n\n            // then we're good to go (or not)\n            return status\n          } catch (err) {\n            logger.error(err)\n            return false\n          }\n        },\n      }),\n    )\n\n    // Must be \"last\" in plugin chain, but before error masking\n    // so can process any data added to results and extensions\n    plugins.push(useRedwoodLogger(loggerConfig))\n\n    const yoga = createYoga({\n      id: healthCheckId,\n      landingPage: isDevEnv,\n      schema,\n      plugins,\n      maskedErrors: {\n        errorMessage: defaultError,\n        isDev: isDevEnv,\n      },\n      logging: logger,\n      healthCheckEndpoint: graphiQLEndpoint + '/health',\n      graphqlEndpoint: graphiQLEndpoint,\n      graphiql: configureGraphiQLPlayground({\n        allowGraphiQL,\n        generateGraphiQLHeader,\n      }),\n      cors: (request: Request) => {\n        const requestOrigin = request.headers.get('origin')\n        return mapRwCorsOptionsToYoga(cors, requestOrigin)\n      },\n    })\n\n    return { yoga, logger }\n  } catch (e) {\n    if (onException) {\n      onException()\n    }\n    throw e\n  }\n}\n",
      "asOf": "2026-11-17"
    },
    "F74": {
      "label": "Project function reference, graphql-yoga",
      "display": "createGraphQLYoga.ts · createGraphQLYoga()",
      "asOf": "2026-11-17"
    },
    "F75": {
      "label": "Project repository, graphql-yoga",
      "display": "redwoodjs/graphql",
      "asOf": "2026-11-17"
    },
    "F76": {
      "label": "Project stars, redwoodjs/graphql",
      "display": "17.6K",
      "asOf": "2026-11-17"
    },
    "F77": {
      "label": "Project push date, redwoodjs/graphql",
      "display": "Nov 2026",
      "asOf": "2026-11-07"
    },
    "F78": {
      "label": "Library name, mercurius",
      "display": "Mercurius",
      "asOf": "2026-11-17"
    },
    "F79": {
      "label": "Monthly downloads, mercurius",
      "display": "1.3M",
      "asOf": "2026-11-16"
    },
    "F80": {
      "label": "License, mercurius",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F81": {
      "label": "Package release, mercurius",
      "display": "16.12.1",
      "asOf": "2026-11-17"
    },
    "F82": {
      "label": "Undated package release, mercurius",
      "display": "v16.12.1",
      "asOf": "2026-11-17"
    },
    "F83": {
      "label": "Repository stars, mercurius",
      "display": "2.5K",
      "asOf": "2026-11-17"
    },
    "F84": {
      "label": "Executes queries, mercurius",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F85": {
      "label": "Validates operations, mercurius",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F86": {
      "label": "Serves HTTP, mercurius",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F87": {
      "label": "Handles subscriptions, mercurius",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F88": {
      "label": "Install, mercurius",
      "display": "npm install fastify mercurius graphql",
      "asOf": "2026-11-17"
    },
    "F89": {
      "label": "What it does, mercurius",
      "display": "Adds GraphQL execution, endpoints, and subscriptions to a Fastify application.",
      "asOf": "2026-11-17"
    },
    "F90": {
      "label": "strengths lead, mercurius",
      "display": "Combines repeated resolver data requests",
      "asOf": "2026-11-17"
    },
    "F91": {
      "label": "strengths, mercurius",
      "display": "Loaders combine resolver requests into bulk queries and can cache results.",
      "asOf": "2026-11-17"
    },
    "F92": {
      "label": "strengths lead, mercurius",
      "display": "Caches query parsing and validation",
      "asOf": "2026-11-17"
    },
    "F93": {
      "label": "strengths, mercurius",
      "display": "Reuse cached query parsing and validation work.",
      "asOf": "2026-11-17"
    },
    "F94": {
      "label": "limitations lead, mercurius",
      "display": "Requires a Fastify application",
      "asOf": "2026-11-17"
    },
    "F95": {
      "label": "limitations, mercurius",
      "display": "Integrate GraphQL through the Fastify host rather than a standalone runtime.",
      "asOf": "2026-11-17"
    },
    "F96": {
      "label": "limitations lead, mercurius",
      "display": "Deferred responses exclude JIT compilation",
      "asOf": "2026-11-17"
    },
    "F97": {
      "label": "limitations, mercurius",
      "display": "Choose deferred responses or JIT compilation; they cannot run together.",
      "asOf": "2026-11-17"
    },
    "F98": {
      "label": "Quickstart, mercurius",
      "display": "'use strict'\n\nconst Fastify = require('fastify')\nconst mercurius = require('mercurius')\n\nconst app = Fastify()\n\nconst schema = `\n  type Query {\n    add(x: Int, y: Int): Int\n  }\n`\n\nconst resolvers = {\n  Query: {\n    add: async (_, { x, y }) => x + y\n  }\n}\n\napp.register(mercurius, {\n  schema,\n  resolvers\n})\n\napp.get('/', async function (req, reply) {\n  const query = '{ add(x: 2, y: 2) }'\n  return reply.graphql(query)\n})\n\napp.listen({ port: 3000 })\n",
      "asOf": "2026-11-17"
    },
    "F99": {
      "label": "Developer need",
      "display": "Direct schema and operation execution",
      "asOf": "2026-11-17"
    },
    "F100": {
      "label": "Why choose graphql",
      "display": "query validation before execution",
      "asOf": "2026-11-17"
    },
    "F101": {
      "label": "Developer need in introduction",
      "display": "direct schema and operation execution",
      "asOf": "2026-11-17"
    },
    "F102": {
      "label": "Developer need",
      "display": "Standalone or framework server integration",
      "asOf": "2026-11-17"
    },
    "F103": {
      "label": "Why choose @apollo/server",
      "display": "included standalone HTTP server",
      "asOf": "2026-11-17"
    },
    "F104": {
      "label": "Developer need in introduction",
      "display": "standalone or framework server integration",
      "asOf": "2026-11-17"
    },
    "F105": {
      "label": "When to consider graphql-yoga",
      "display": "built-in SSE subscriptions fit",
      "asOf": "2026-11-17"
    },
    "F106": {
      "label": "Developer need",
      "display": "Fetch handlers with included subscriptions",
      "asOf": "2026-11-17"
    },
    "F107": {
      "label": "Why choose graphql-yoga",
      "display": "built-in Server-Sent Events transport",
      "asOf": "2026-11-17"
    },
    "F108": {
      "label": "Developer need in introduction",
      "display": "fetch handlers with included subscriptions",
      "asOf": "2026-11-17"
    },
    "F109": {
      "label": "Developer need",
      "display": "GraphQL inside a Fastify application",
      "asOf": "2026-11-17"
    },
    "F110": {
      "label": "Why choose mercurius",
      "display": "batched resolver data loading",
      "asOf": "2026-11-17"
    },
    "F111": {
      "label": "Developer need in introduction",
      "display": "GraphQL inside a Fastify application",
      "asOf": "2026-11-17"
    },
    "F112": {
      "label": "Page introduction",
      "display": "JavaScript GraphQL libraries let API developers define schemas and execute GraphQL requests.",
      "asOf": "2026-11-17"
    },
    "F113": {
      "label": "FAQ: How does GraphQL.js differ from an HTTP server?",
      "display": "It provides schemas and execution; a host supplies transport and response serialization.",
      "asOf": "2026-11-17"
    },
    "F114": {
      "label": "FAQ: Does the graphql function validate queries?",
      "display": "The graphql entry point checks syntactic and semantic validity before execution.",
      "asOf": "2026-11-17"
    },
    "F115": {
      "label": "FAQ: Does subscription execution provide a network transport?",
      "display": "Connect the subscription event stream to your own transport and event system.",
      "asOf": "2026-11-17"
    },
    "F116": {
      "label": "FAQ: Does Apollo document caching store query results?",
      "display": "The document store caches operations rather than the data returned by queries.",
      "asOf": "2026-11-17"
    },
    "F117": {
      "label": "FAQ: When should Apollo use a framework integration?",
      "display": "Use an integration for custom middleware, CORS behavior, or additional endpoints.",
      "asOf": "2026-11-17"
    },
    "F118": {
      "label": "FAQ: How are non-federated Apollo subscriptions enabled?",
      "display": "Add graphql-ws and configure the subscription transport alongside HTTP.",
      "asOf": "2026-11-17"
    },
    "F119": {
      "label": "FAQ: Which subscription transport does Yoga include?",
      "display": "Yoga includes the distinct-connections mode of GraphQL over Server-Sent Events.",
      "asOf": "2026-11-17"
    },
    "F120": {
      "label": "FAQ: Can Yoga handle GraphQL over WebSockets?",
      "display": "Integrate graphql-ws when the client requires the WebSocket protocol.",
      "asOf": "2026-11-17"
    },
    "F121": {
      "label": "FAQ: Why use the Yoga request pipeline for WebSockets?",
      "display": "Routing through getResultForParams preserves request hooks before parsing and execution.",
      "asOf": "2026-11-17"
    },
    "F122": {
      "label": "FAQ: How do Mercurius loaders reduce repeated fetching?",
      "display": "Loaders combine resolver requests into bulk queries and can cache their results.",
      "asOf": "2026-11-17"
    },
    "F123": {
      "label": "FAQ: Can Mercurius combine deferred responses and JIT?",
      "display": "Its deferred-response mode cannot be used together with JIT compilation.",
      "asOf": "2026-11-17"
    },
    "F124": {
      "label": "FAQ: Which GraphQL peer does Apollo require?",
      "display": "The selected Apollo release requires the GraphQL peer range declared in its package.",
      "asOf": "2026-11-17"
    },
    "F125": {
      "label": "Library name, graphql",
      "display": "GraphQL.js",
      "asOf": "2026-11-20"
    },
    "F126": {
      "label": "Monthly downloads, graphql",
      "display": "270.5M",
      "asOf": "2026-11-20"
    },
    "F127": {
      "label": "License, graphql",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F128": {
      "label": "Package release, graphql",
      "display": "17.1.0",
      "asOf": "2026-11-20"
    },
    "F129": {
      "label": "Package release date, graphql",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F130": {
      "label": "Install, graphql",
      "display": "npm install graphql",
      "asOf": "2026-11-20"
    },
    "F131": {
      "label": "Quickstart, graphql",
      "display": "import { buildSchema, graphql } from 'graphql';\n\nconst schema = buildSchema('type Query { hello: String }');\nconst result = await graphql({ schema, source: '{ hello }', rootValue: { hello: () => 'world' } });\n",
      "asOf": "2026-11-20"
    },
    "F132": {
      "label": "Repository stars, graphql",
      "display": "20.3K",
      "asOf": "2026-11-20"
    },
    "F133": {
      "label": "HTTP request handler, graphql",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F134": {
      "label": "Subscription transport, graphql",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F135": {
      "label": "SDL schema building, graphql",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F136": {
      "label": "Runtime role, graphql",
      "display": "Core SDL/schema/AST validation and in-process execution; networking and transport framing remain host responsibilities.",
      "asOf": "2026-11-20"
    },
    "F137": {
      "label": "Host and peer requirements, graphql",
      "display": "Supported ESM/top-level-await host for current17.1.0. This is in-process schema/query execution, not an HTTP endpoint.",
      "asOf": "2026-11-20"
    },
    "F138": {
      "label": "Project function, graphql",
      "display": "export function makeContextQueryFn(\n  schema: GraphQLSchema,\n  operation: 'query' | 'mutation',\n  field: GraphQLField<any, unknown>\n) {\n  const { argumentNodes, variableDefinitions } = getVariablesForGraphQLField(field)\n  const rootName = getRootTypeName(field.type)\n  const exec = async (args: Record<string, any>, query: string, context: KeystoneContext) => {\n    const selectionSet = (\n      parse(`fragment x on ${rootName} {${query}}`).definitions[0] as FragmentDefinitionNode\n    ).selectionSet\n\n    const document: DocumentNode = {\n      kind: Kind.DOCUMENT,\n      definitions: [\n        {\n          kind: Kind.OPERATION_DEFINITION,\n          // OperationTypeNode is an ts enum where the values are 'query' | 'mutation' | 'subscription'\n          operation: operation as OperationTypeNode,\n          selectionSet: {\n            kind: Kind.SELECTION_SET,\n            selections: [\n              {\n                kind: Kind.FIELD,\n                name: { kind: Kind.NAME, value: field.name },\n                arguments: argumentNodes,\n                selectionSet: selectionSet,\n              },\n            ],\n          },\n          variableDefinitions,\n        },\n      ],\n    }\n\n    const validationErrors = validate(schema, document)\n\n    if (validationErrors.length > 0) {\n      throw validationErrors[0]\n    }\n\n    const result = await execute({\n      schema,\n      document,\n      contextValue: context,\n      variableValues: Object.fromEntries(\n        // GraphQL for some reason decides to make undefined values in args\n        // skip defaulting for some reason\n        // this ofc doesn't technically fully fix it (bc nested things)\n        // but for the cases where we care, it does\n        Object.entries(args).filter(([, val]) => val !== undefined)\n      ),\n      rootValue: {},\n    })\n    if (result.errors?.length) {\n      throw result.errors[0]\n    }\n    return result.data![field.name]\n  }\n\n  return (\n    _args: {\n      query?: string\n    } & Record<string, unknown> = {}, // WARNING: sometimes this is undefined somewhere\n    context: KeystoneContext\n  ) => {\n    const { query, ...args } = _args\n    return exec(args, query ?? 'id', context) as Promise<any>\n  }\n}\n",
      "asOf": "2026-11-20"
    },
    "F139": {
      "label": "Project source file, graphql",
      "display": "packages/core/src/lib/context/graphql.ts",
      "asOf": "2026-11-20"
    },
    "F140": {
      "label": "Project full_name, graphql",
      "display": "keystonejs/keystone",
      "asOf": "2026-11-20"
    },
    "F141": {
      "label": "Project stargazers_count, graphql",
      "display": "10.0K",
      "asOf": "2026-11-20"
    },
    "F142": {
      "label": "Library name, @graphql-tools/schema",
      "display": "@graphql-tools/schema",
      "asOf": "2026-11-20"
    },
    "F143": {
      "label": "Monthly downloads, @graphql-tools/schema",
      "display": "94.5M",
      "asOf": "2026-11-20"
    },
    "F144": {
      "label": "License, @graphql-tools/schema",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F145": {
      "label": "Package release, @graphql-tools/schema",
      "display": "11.0.9",
      "asOf": "2026-11-20"
    },
    "F146": {
      "label": "Package release date, @graphql-tools/schema",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F147": {
      "label": "Install, @graphql-tools/schema",
      "display": "npm install @graphql-tools/schema graphql",
      "asOf": "2026-11-20"
    },
    "F148": {
      "label": "Quickstart, @graphql-tools/schema",
      "display": "import { makeExecutableSchema } from '@graphql-tools/schema';\n\nconst schema = makeExecutableSchema({\n  typeDefs: 'type Query { hello: String }',\n  resolvers: { Query: { hello: () => 'world' } },\n});\n",
      "asOf": "2026-11-20"
    },
    "F149": {
      "label": "Official description, @graphql-tools/schema",
      "display": "A set of utils for faster development of GraphQL tools",
      "asOf": "2026-11-20"
    },
    "F150": {
      "label": "Quickstart source file, @graphql-tools/schema",
      "display": "docs/generate-schema",
      "asOf": "2026-11-20"
    },
    "F151": {
      "label": "Repository stars, @graphql-tools/schema",
      "display": "5.4K",
      "asOf": "2026-11-20"
    },
    "F152": {
      "label": "HTTP request handler, @graphql-tools/schema",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F153": {
      "label": "Subscription transport, @graphql-tools/schema",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F154": {
      "label": "SDL schema building, @graphql-tools/schema",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F155": {
      "label": "Runtime role, @graphql-tools/schema",
      "display": "Executable schema construction and merging from SDL/resolvers; not an HTTP or WebSocket server.",
      "asOf": "2026-11-20"
    },
    "F156": {
      "label": "Host and peer requirements, @graphql-tools/schema",
      "display": "Supported module host and GraphQL16/17 peer. First call constructs a schema; a host/executor is separate.",
      "asOf": "2026-11-20"
    },
    "F157": {
      "label": "Project function, @graphql-tools/schema",
      "display": "async generateSchema<T extends GqlModuleOptions>(\n  options: T = { typeDefs: [] } as T,\n): Promise<GraphQLSchema> {\n  if (options.directiveResolvers) {\n    this.logger.warn(\n      'The \"directiveResolvers\" option is ignored (it has had no effect since v9.2.0): the directive resolvers passed through it are never called. Apply the directives with \"transformSchema\" instead (for example, with \"mapSchema()\" from \"@graphql-tools/utils\").',\n    );\n  }\n  const resolvers = this.resolversExplorerService.explore();\n  const rawResolvers = extend(\n    this.scalarsExplorerService.explore(),\n    resolvers,\n  );\n\n  const typesResolvers = options.transformResolvers\n    ? await options.transformResolvers(rawResolvers)\n    : rawResolvers;\n  /**\n   * Merge field by field, so that an entry of the \"resolvers\" option does\n   * not replace the field resolvers discovered for the same type\n   */\n  const executableResolvers: IResolvers = mergeResolvers(\n    [typesResolvers, options.resolvers].flat(),\n  );\n\n  const transformSchema = async (schema: GraphQLSchema) =>\n    options.transformSchema ? await options.transformSchema(schema) : schema;\n\n  if (options.autoSchemaFile) {\n    const autoGeneratedSchema: GraphQLSchema =\n      await this.gqlSchemaBuilder.build(\n        options.autoSchemaFile,\n        options,\n        this.resolversExplorerService.getAllCtors(),\n      );\n    const executableSchema = makeExecutableSchema({\n      resolvers: executableResolvers,\n      typeDefs: gql`\n        ${printSchema(autoGeneratedSchema)}\n      `,\n      resolverValidationOptions: {\n        ...(options.resolverValidationOptions || {}),\n        requireResolversForResolveType: 'ignore',\n      },\n      inheritResolversFromInterfaces: options.inheritResolversFromInterfaces,\n    });\n    let schema = options.schema\n      ? mergeSchemas({\n          schemas: [options.schema, executableSchema],\n        })\n      : executableSchema;\n\n    const autoGeneratedSchemaConfig = autoGeneratedSchema.toConfig();\n    const schemaConfig = this.overrideOrExtendResolvers(\n      schema.toConfig(),\n      autoGeneratedSchemaConfig,\n      executableSchema,\n      executableResolvers,\n      options.buildSchemaOptions?.fieldMiddleware ?? [],\n    );\n\n    schema = new GraphQLSchema(schemaConfig);\n    schema = await transformSchema(schema);\n    schema = options.sortSchema ? lexicographicSortSchema(schema) : schema;\n    return schema;\n  }\n  if (this.isEmptyValue(options.typeDefs)) {\n    const schema = await transformSchema(options.schema);\n    return schema;\n  }\n  const executableSchemaConfig = {\n    resolvers: executableResolvers,\n    typeDefs: gql`\n      ${options.typeDefs}\n    `,\n    resolverValidationOptions: options.resolverValidationOptions,\n    inheritResolversFromInterfaces: options.inheritResolversFromInterfaces,\n  };\n  /**\n   * Merge the type definitions themselves (rather than a schema made\n   * executable from them) into the \"schema\" option, so that a scalar or an\n   * enum that both declare keeps the implementation of the \"schema\" option,\n   * unless one is registered on the Nest side\n   */\n  let schema = options.schema\n    ? mergeSchemas({\n        schemas: [options.schema],\n        ...executableSchemaConfig,\n      })\n    : makeExecutableSchema(executableSchemaConfig);\n\n  if (options.inheritResolversFromInterfaces) {\n    inheritResolversFromInterfaces(\n      schema,\n      options.schema\n        ? mergeResolvers([\n            getResolversFromSchema(options.schema),\n            executableResolvers,\n          ])\n        : executableResolvers,\n    );\n  }\n  removeTempField(schema);\n  schema = await transformSchema(schema);\n  schema = options.sortSchema ? lexicographicSortSchema(schema) : schema;\n  return schema;\n}\n",
      "asOf": "2026-11-20"
    },
    "F158": {
      "label": "Project source file, @graphql-tools/schema",
      "display": "packages/graphql/lib/graphql.factory.ts",
      "asOf": "2026-11-20"
    },
    "F159": {
      "label": "Project full_name, @graphql-tools/schema",
      "display": "nestjs/graphql",
      "asOf": "2026-11-20"
    },
    "F160": {
      "label": "Project stargazers_count, @graphql-tools/schema",
      "display": "1.6K",
      "asOf": "2026-11-20"
    },
    "F161": {
      "label": "Library name, graphql-ws",
      "display": "graphql-ws",
      "asOf": "2026-11-20"
    },
    "F162": {
      "label": "Monthly downloads, graphql-ws",
      "display": "63.9M",
      "asOf": "2026-11-20"
    },
    "F163": {
      "label": "License, graphql-ws",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F164": {
      "label": "Package release, graphql-ws",
      "display": "6.4.3",
      "asOf": "2026-11-20"
    },
    "F165": {
      "label": "Package release date, graphql-ws",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F166": {
      "label": "Install, graphql-ws",
      "display": "npm install graphql-ws graphql ws",
      "asOf": "2026-11-20"
    },
    "F167": {
      "label": "Quickstart, graphql-ws",
      "display": "import { GraphQLObjectType, GraphQLSchema, GraphQLString } from \"graphql\";\nimport { WebSocketServer } from \"ws\";\nimport { useServer } from \"graphql-ws/use/ws\";\nconst schema = new GraphQLSchema({ query: new GraphQLObjectType({ name: \"Query\", fields: { hello: { type: GraphQLString, resolve: () => \"Hello\" } } }) });\nuseServer({ schema }, new WebSocketServer({ port: 4000 }));\n",
      "asOf": "2026-11-20"
    },
    "F168": {
      "label": "Official description, graphql-ws",
      "display": "Coherent, zero-dependency, lazy, simple, GraphQL over WebSocket Protocol compliant server and client",
      "asOf": "2026-11-20"
    },
    "F169": {
      "label": "Quickstart source file, graphql-ws",
      "display": "src/use/ws.ts",
      "asOf": "2026-11-20"
    },
    "F170": {
      "label": "Repository stars, graphql-ws",
      "display": "1.9K",
      "asOf": "2026-11-20"
    },
    "F171": {
      "label": "HTTP request handler, graphql-ws",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F172": {
      "label": "Subscription transport, graphql-ws",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F173": {
      "label": "SDL schema building, graphql-ws",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F174": {
      "label": "Runtime role, graphql-ws",
      "display": "GraphQL-over-WebSocket protocol server/client with execution/subscription lifecycle; separate from GraphQL-over-HTTP handler.",
      "asOf": "2026-11-20"
    },
    "F175": {
      "label": "Host and peer requirements, graphql-ws",
      "display": "Supported Node ESM, ws peer, supported GraphQL peer, free port4000. Starts GraphQL-over-WebSocket service; transport clients must use matching protocol.",
      "asOf": "2026-11-20"
    },
    "F176": {
      "label": "Project function, graphql-ws",
      "display": "async function start() {\n  /** Create WS Server */\n  const wsServer = new WebSocketServer({\n    server: httpServer,\n    path: '/graphql',\n  })\n\n  /** hand-in created schema and have the WS Server start listening */\n  const serverCleanup = useServer({ schema, context }, wsServer)\n\n  const server = new ApolloServer<Context>({\n    schema,\n    plugins: [\n      ApolloServerPluginDrainHttpServer({ httpServer }),\n      {\n        async serverWillStart() {\n          return {\n            async drainServer() {\n              await serverCleanup.dispose()\n            },\n          }\n        },\n      },\n    ],\n  })\n\n  await server.start()\n  app.use('/graphql', cors<cors.CorsRequest>(), express.json(), expressMiddleware(server, { context: async () => context }));\n\n  httpServer.listen(PORT, () => {\n    console.log(`🚀 Server ready at http://localhost:${PORT}/graphql`)\n    console.log(`⏰ Subscriptions ready at http://localhost:${PORT}/graphql`)\n    console.log(\n      `⭐️ See sample queries: http://pris.ly/e/ts/graphql-subscriptions#using-the-graphql-api`,\n    )\n  })\n}\n",
      "asOf": "2026-11-20"
    },
    "F177": {
      "label": "Project source file, graphql-ws",
      "display": "orm/graphql-subscriptions/src/server.ts",
      "asOf": "2026-11-20"
    },
    "F178": {
      "label": "Project full_name, graphql-ws",
      "display": "prisma/prisma-examples",
      "asOf": "2026-11-20"
    },
    "F179": {
      "label": "Project stargazers_count, graphql-ws",
      "display": "6.7K",
      "asOf": "2026-11-20"
    },
    "F180": {
      "label": "Library name, @envelop/core",
      "display": "Envelop",
      "asOf": "2026-11-20"
    },
    "F181": {
      "label": "Monthly downloads, @envelop/core",
      "display": "45.8M",
      "asOf": "2026-11-20"
    },
    "F182": {
      "label": "License, @envelop/core",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F183": {
      "label": "Package release, @envelop/core",
      "display": "6.0.1",
      "asOf": "2026-11-20"
    },
    "F184": {
      "label": "Package release date, @envelop/core",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F185": {
      "label": "Install, @envelop/core",
      "display": "npm install @envelop/core graphql",
      "asOf": "2026-11-20"
    },
    "F186": {
      "label": "Quickstart, @envelop/core",
      "display": "import * as graphql from 'graphql';\nimport { envelop, useEngine, useSchema } from '@envelop/core';\n\nconst getEnveloped = envelop({ plugins: [\n  useEngine(graphql),\n  useSchema(graphql.buildSchema('type Query { hello: String }')),\n] });\nconst { schema, parse, execute, contextFactory } = getEnveloped();\nconst result = await execute({ schema, document: parse('{ __typename }'), contextValue: await contextFactory() });\n",
      "asOf": "2026-11-20"
    },
    "F187": {
      "label": "Official description, @envelop/core",
      "display": "This is the core package for Envelop. You can find a complete documentation here: https://github.com/graphql-hive/envelop",
      "asOf": "2026-11-20"
    },
    "F188": {
      "label": "Quickstart source file, @envelop/core",
      "display": "packages/envelop/core/src/create.ts",
      "asOf": "2026-11-20"
    },
    "F189": {
      "label": "Repository stars, @envelop/core",
      "display": "8.5K",
      "asOf": "2026-11-20"
    },
    "F190": {
      "label": "HTTP request handler, @envelop/core",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F191": {
      "label": "Subscription transport, @envelop/core",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F192": {
      "label": "SDL schema building, @envelop/core",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F193": {
      "label": "Runtime role, @envelop/core",
      "display": "Engine/plugin orchestration of parse, validate, context, execute, and subscribe; host supplies network transport and engine.",
      "asOf": "2026-11-20"
    },
    "F194": {
      "label": "Host and peer requirements, @envelop/core",
      "display": "Supported ESM/top-level-await host. UseEngine supplies actual GraphQL engine; this first call executes an in-process introspection field, not an HTTP server.",
      "asOf": "2026-11-20"
    },
    "F195": {
      "label": "Project function, @envelop/core",
      "display": "async function getExecutionConfig(ctx) {\n          const config = await originalGetExecutionConfig.call(this, ctx);\n          const getEnveloped = envelop({\n            plugins: [\n              // PERF: memoize argument if it makes any difference\n              useEngine({\n                ...graphql,\n                execute: config.execute,\n                subscribe: config.subscribe,\n                specifiedRules: event.validationRules,\n              }),\n              useSchema(config.schema),\n              useEnvelop(userGetEnveloped),\n            ],\n          });\n          const {\n            schema,\n            execute,\n            subscribe,\n            contextFactory,\n            parse: envelopedParse,\n            validate: envelopedValidate,\n          } = getEnveloped(ctx);\n          const parseAndValidate = (query: string) => {\n            const source = new graphql.Source(query, \"GraphQL HTTP Request\");\n            let document;\n            try {\n              document = envelopedParse(source);\n            } catch (e) {\n              return { errors: [e] };\n            }\n            const errors = envelopedValidate(schema, document);\n            return errors.length ? { errors } : { document };\n          };\n\n          return {\n            ...config,\n            contextValue: contextFactory(ctx),\n            schema,\n            execute,\n            subscribe,\n            parseAndValidate,\n          };\n        }\n",
      "asOf": "2026-11-20"
    },
    "F196": {
      "label": "Project source file, @envelop/core",
      "display": "grafast/grafserv/src/envelop/index.ts",
      "asOf": "2026-11-20"
    },
    "F197": {
      "label": "Project full_name, @envelop/core",
      "display": "graphile/crystal",
      "asOf": "2026-11-20"
    },
    "F198": {
      "label": "Project stargazers_count, @envelop/core",
      "display": "12.9K",
      "asOf": "2026-11-20"
    },
    "F199": {
      "label": "Library name, @apollo/server",
      "display": "Apollo Server",
      "asOf": "2026-11-20"
    },
    "F200": {
      "label": "Monthly downloads, @apollo/server",
      "display": "15.2M",
      "asOf": "2026-11-20"
    },
    "F201": {
      "label": "License, @apollo/server",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F202": {
      "label": "Package release, @apollo/server",
      "display": "5.5.2",
      "asOf": "2026-11-20"
    },
    "F203": {
      "label": "Package release date, @apollo/server",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F204": {
      "label": "Install, @apollo/server",
      "display": "npm install @apollo/server 'graphql@^16.11.0'",
      "asOf": "2026-11-20"
    },
    "F205": {
      "label": "Quickstart, @apollo/server",
      "display": "import { ApolloServer } from '@apollo/server';\n\nconst server = new ApolloServer({\n  typeDefs: 'type Query { hello: String }',\n  resolvers: { Query: { hello: () => 'world' } },\n});\nawait server.start();\nconst result = await server.executeOperation({ query: '{ hello }' });\nawait server.stop();\n",
      "asOf": "2026-11-20"
    },
    "F206": {
      "label": "Repository stars, @apollo/server",
      "display": "14.0K",
      "asOf": "2026-11-20"
    },
    "F207": {
      "label": "HTTP request handler, @apollo/server",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F208": {
      "label": "Subscription transport, @apollo/server",
      "display": "Via plugin",
      "asOf": "2026-11-20"
    },
    "F209": {
      "label": "SDL schema building, @apollo/server",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F210": {
      "label": "Runtime role, @apollo/server",
      "display": "Application GraphQL server with schema/resolvers/plugins and HTTP integrations; subscription network transport is extra.",
      "asOf": "2026-11-20"
    },
    "F211": {
      "label": "Host and peer requirements, @apollo/server",
      "display": "Supported Node ESM/top-level-await host. Apollo5.5.2 requires graphql^16.11.0, independently of the GraphQL17 row. Executes in-process and shuts down; HTTP host not started.",
      "asOf": "2026-11-20"
    },
    "F212": {
      "label": "Project function, @apollo/server",
      "display": "protected async registerExpress(\n  options: T,\n  { preStartHook }: { preStartHook?: () => void } = {},\n) {\n  const { expressMiddleware } = await loadPackage(\n    '@as-integrations/express5',\n    'GraphQLModule',\n    () => import('@as-integrations/express5'),\n  );\n\n  const { path, typeDefs, resolvers, schema } = options;\n\n  const httpAdapter = this.httpAdapterHost.httpAdapter;\n\n  // Workaround: the landing page requires body to be present\n  // otherwise, it shows the \"req.body is not set; this probably means you forgot to set up the json middleware before the Apollo Server middleware.\" error.\n  // The latest version of \"body-parser\" does not set the body if there is no payload.\n  // @see https://github.com/nestjs/graphql/issues/3451\n  // @see https://github.com/nestjs/nest/pull/14443\n  httpAdapter.use(path, (req: any, _: any, next: () => void) => {\n    req.body = req.body ?? {};\n    next();\n  });\n\n  const app = httpAdapter.getInstance();\n  const drainHttpServerPlugin = ApolloServerPluginDrainHttpServer({\n    httpServer: httpAdapter.getHttpServer(),\n  });\n\n  preStartHook?.();\n\n  const server = new ApolloServer({\n    typeDefs,\n    resolvers,\n    schema,\n    ...options,\n    plugins: [\n      ...(options.plugins ?? []),\n      drainHttpServerPlugin,\n      this.createRejectSubscriptionsPlugin(),\n    ],\n  });\n\n  await server.start();\n\n  // Register an exact route, as Nest does for its own routes (and as\n  // \"registerFastify\" does): \"app.use(path, ...)\" would also serve\n  // \"/graphql/<anything>\", out of reach of the middleware the application\n  // binds to \"path\" with \"MiddlewareConsumer#forRoutes({ path, method })\".\n  app.all(\n    path,\n    expressMiddleware(server, {\n      context: options.context,\n    }),\n  );\n\n  this.apolloServer = server;\n}\n",
      "asOf": "2026-11-20"
    },
    "F213": {
      "label": "Project source file, @apollo/server",
      "display": "packages/apollo/lib/drivers/apollo-base.driver.ts",
      "asOf": "2026-11-20"
    },
    "F214": {
      "label": "Project full_name, @apollo/server",
      "display": "nestjs/graphql",
      "asOf": "2026-11-20"
    },
    "F215": {
      "label": "Project stargazers_count, @apollo/server",
      "display": "1.6K",
      "asOf": "2026-11-20"
    },
    "F216": {
      "label": "Library name, graphql-yoga",
      "display": "GraphQL Yoga",
      "asOf": "2026-11-20"
    },
    "F217": {
      "label": "Monthly downloads, graphql-yoga",
      "display": "11.1M",
      "asOf": "2026-11-20"
    },
    "F218": {
      "label": "License, graphql-yoga",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F219": {
      "label": "Package release, graphql-yoga",
      "display": "6.1.0",
      "asOf": "2026-11-20"
    },
    "F220": {
      "label": "Package release date, graphql-yoga",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F221": {
      "label": "Install, graphql-yoga",
      "display": "npm install graphql-yoga graphql",
      "asOf": "2026-11-20"
    },
    "F222": {
      "label": "Quickstart, graphql-yoga",
      "display": "import { createYoga, createSchema } from 'graphql-yoga';\n\nconst yoga = createYoga({ schema: createSchema({\n  typeDefs: 'type Query { hello: String }',\n  resolvers: { Query: { hello: () => 'world' } },\n}) });\nconst response = await yoga.fetch('http://localhost/graphql?query={hello}');\n",
      "asOf": "2026-11-20"
    },
    "F223": {
      "label": "Repository stars, graphql-yoga",
      "display": "8.5K",
      "asOf": "2026-11-20"
    },
    "F224": {
      "label": "HTTP request handler, graphql-yoga",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F225": {
      "label": "Subscription transport, graphql-yoga",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F226": {
      "label": "SDL schema building, graphql-yoga",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F227": {
      "label": "Runtime role, graphql-yoga",
      "display": "Fetch-based GraphQL server integrating schema creation, plugins, HTTP, and SSE subscription transport.",
      "asOf": "2026-11-20"
    },
    "F228": {
      "label": "Host and peer requirements, graphql-yoga",
      "display": "Supported ESM/top-level-await host, compatible GraphQL16/17 peer, and URL/Fetch APIs supplied by Yoga runtime. Internal fetch first call does not bind a port.",
      "asOf": "2026-11-20"
    },
    "F229": {
      "label": "Project function, graphql-yoga",
      "display": "export const createGraphQLYoga = ({\n  healthCheckId,\n  loggerConfig,\n  context,\n  getCurrentUser,\n  onException,\n  generateGraphiQLHeader,\n  extraPlugins,\n  authDecoder,\n  cors,\n  services,\n  sdls,\n  directives = [],\n  armorConfig,\n  allowedOperations,\n  allowIntrospection,\n  allowGraphiQL,\n  defaultError = 'Something went wrong.',\n  graphiQLEndpoint = '/graphql',\n  schemaOptions,\n  realtime,\n  trustedDocuments,\n  openTelemetryOptions,\n  includeScalars,\n}: GraphQLYogaOptions) => {\n  let schema: GraphQLSchema\n  let redwoodDirectivePlugins = [] as Plugin[]\n  const logger = loggerConfig.logger\n\n  const isDevEnv = process.env.NODE_ENV === 'development'\n\n  try {\n    // @NOTE: Directives are optional\n    const projectDirectives = makeDirectivesForPlugin(directives)\n\n    if (projectDirectives.length > 0) {\n      ;(redwoodDirectivePlugins as useRedwoodDirectiveReturn[]) =\n        projectDirectives.map((directive) =>\n          useRedwoodDirective(directive as DirectivePluginOptions),\n        )\n    }\n\n    // @NOTE: Subscriptions are optional and only work in the context of a server\n    let projectSubscriptions = [] as RedwoodSubscription[]\n\n    if (realtime?.subscriptions?.subscriptions) {\n      projectSubscriptions = makeSubscriptions(\n        realtime.subscriptions.subscriptions,\n      )\n    }\n\n    schema = makeMergedSchema({\n      sdls,\n      services,\n      directives: projectDirectives,\n      subscriptions: projectSubscriptions,\n      schemaOptions,\n      includeScalars,\n    })\n  } catch (e) {\n    logger.fatal(e as Error, '\\n ⚠️ GraphQL server crashed \\n')\n\n    if (onException) {\n      onException()\n    }\n\n    // Forcefully crash the graphql server\n    // so users know that a misconfiguration has happened\n    process.exit(1)\n  }\n\n  try {\n    // Important: Plugins are executed in order of their usage, and inject functionality serially,\n    // so the order here matters\n    const plugins: Plugin<any>[] = []\n\n    const { disableIntrospection } = configureGraphQLIntrospection({\n      allowIntrospection,\n    })\n\n    if (disableIntrospection) {\n      plugins.push(useDisableIntrospection())\n    }\n\n    // Custom Redwood plugins\n    plugins.push(useRedwoodAuthContext(getCurrentUser, authDecoder))\n    plugins.push(useRedwoodGlobalContextSetter())\n\n    if (context) {\n      plugins.push(useRedwoodPopulateContext(context))\n    }\n\n    // Custom Redwood plugins\n    plugins.push(...redwoodDirectivePlugins)\n\n    // Custom Redwood OpenTelemetry plugin\n    if (openTelemetryOptions !== undefined) {\n      plugins.push(useRedwoodOpenTelemetry(openTelemetryOptions))\n    }\n\n    // Secure the GraphQL server\n    plugins.push(useArmor(logger, armorConfig))\n\n    // Only allow execution of specific operation types\n    const defaultAllowedOperations = [\n      OperationTypeNode.QUERY,\n      OperationTypeNode.MUTATION,\n    ]\n\n    // allow subscriptions if using them (unless you override)\n    if (realtime?.subscriptions?.subscriptions) {\n      defaultAllowedOperations.push(OperationTypeNode.SUBSCRIPTION)\n    }\n\n    plugins.push(\n      useFilterAllowedOperations(allowedOperations || defaultAllowedOperations),\n    )\n\n    if (trustedDocuments && !trustedDocuments.disabled) {\n      plugins.push(useRedwoodTrustedDocuments(trustedDocuments))\n    }\n\n    // App-defined plugins\n    if (extraPlugins && extraPlugins.length > 0) {\n      plugins.push(...extraPlugins)\n    }\n\n    plugins.push(useRedwoodError(logger))\n\n    plugins.push(\n      useReadinessCheck({\n        endpoint: graphiQLEndpoint + '/readiness',\n        check: async ({ request }) => {\n          try {\n            // if we can reach the health check endpoint ...\n            const response = await yoga.fetch(\n              new URL(graphiQLEndpoint + '/health', request.url),\n            )\n\n            const expectedHealthCheckId = healthCheckId || 'yoga'\n\n            // ... and the health check id's match the request and response's\n            const status =\n              response.headers.get('x-yoga-id') === expectedHealthCheckId &&\n              request.headers.get('x-yoga-id') === expectedHealthCheckId\n\n            // then we're good to go (or not)\n            return status\n          } catch (err) {\n            logger.error(err)\n            return false\n          }\n        },\n      }),\n    )\n\n    // Must be \"last\" in plugin chain, but before error masking\n    // so can process any data added to results and extensions\n    plugins.push(useRedwoodLogger(loggerConfig))\n\n    const yoga = createYoga({\n      id: healthCheckId,\n      landingPage: isDevEnv,\n      schema,\n      plugins,\n      maskedErrors: {\n        errorMessage: defaultError,\n        isDev: isDevEnv,\n      },\n      logging: logger,\n      healthCheckEndpoint: graphiQLEndpoint + '/health',\n      graphqlEndpoint: graphiQLEndpoint,\n      graphiql: configureGraphiQLPlayground({\n        allowGraphiQL,\n        generateGraphiQLHeader,\n      }),\n      cors: (request: Request) => {\n        const requestOrigin = request.headers.get('origin')\n        return mapRwCorsOptionsToYoga(cors, requestOrigin)\n      },\n    })\n\n    return { yoga, logger }\n  } catch (e) {\n    if (onException) {\n      onException()\n    }\n    throw e\n  }\n}\n",
      "asOf": "2026-11-20"
    },
    "F230": {
      "label": "Project source file, graphql-yoga",
      "display": "packages/graphql-server/src/createGraphQLYoga.ts",
      "asOf": "2026-11-20"
    },
    "F231": {
      "label": "Project full_name, graphql-yoga",
      "display": "redwoodjs/graphql",
      "asOf": "2026-11-20"
    },
    "F232": {
      "label": "Project stargazers_count, graphql-yoga",
      "display": "17.6K",
      "asOf": "2026-11-20"
    },
    "F233": {
      "label": "Library name, graphql-http",
      "display": "graphql-http",
      "asOf": "2026-11-20"
    },
    "F234": {
      "label": "Monthly downloads, graphql-http",
      "display": "9.1M",
      "asOf": "2026-11-20"
    },
    "F235": {
      "label": "License, graphql-http",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F236": {
      "label": "Package release, graphql-http",
      "display": "1.23.1",
      "asOf": "2026-11-20"
    },
    "F237": {
      "label": "Package release date, graphql-http",
      "display": "Sep 2026",
      "asOf": "2026-11-20"
    },
    "F238": {
      "label": "Install, graphql-http",
      "display": "npm install graphql-http graphql express",
      "asOf": "2026-11-20"
    },
    "F239": {
      "label": "Quickstart, graphql-http",
      "display": "import express from 'express';\nimport { buildSchema } from 'graphql';\nimport { createHandler } from 'graphql-http/lib/use/express';\n\nconst schema = buildSchema('type Query { hello: String }');\nconst app = express();\napp.all('/graphql', createHandler({ schema, rootValue: { hello: () => 'world' } }));\napp.listen(4000);\n",
      "asOf": "2026-11-20"
    },
    "F240": {
      "label": "Official description, graphql-http",
      "display": "Simple, pluggable, zero-dependency, GraphQL over HTTP spec compliant server, client and audit suite.",
      "asOf": "2026-11-20"
    },
    "F241": {
      "label": "Quickstart source file, graphql-http",
      "display": "README.md",
      "asOf": "2026-11-20"
    },
    "F242": {
      "label": "Repository stars, graphql-http",
      "display": "366",
      "asOf": "2026-11-20"
    },
    "F243": {
      "label": "HTTP request handler, graphql-http",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F244": {
      "label": "Subscription transport, graphql-http",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F245": {
      "label": "SDL schema building, graphql-http",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F246": {
      "label": "Runtime role, graphql-http",
      "display": "GraphQL-over-HTTP handler/host adapters; subscription transports intentionally separate.",
      "asOf": "2026-11-20"
    },
    "F247": {
      "label": "Host and peer requirements, graphql-http",
      "display": "Supported Node ESM with Express/GraphQL peer, free port4000. Adapter handles GraphQL-over-HTTP requests; no standalone subscription server.",
      "asOf": "2026-11-20"
    },
    "F248": {
      "label": "Project function, graphql-http",
      "display": "(data: Data) => {\n    const graphqlHandler = createHandler({\n        schema: schemaBuilder(data),\n    });\n\n    const expressMiddleware: Handler = (req, res, next) => {\n        if (req.is('application/json')) {\n            return graphqlHandler(req, res, next);\n        }\n\n        return graphiqlHandler(req, res, next);\n    };\n\n    return expressMiddleware;\n}\n",
      "asOf": "2026-11-20"
    },
    "F249": {
      "label": "Project source file, graphql-http",
      "display": "src/jsonGraphqlExpress.ts",
      "asOf": "2026-11-20"
    },
    "F250": {
      "label": "Project full_name, graphql-http",
      "display": "marmelab/json-graphql-server",
      "asOf": "2026-11-20"
    },
    "F251": {
      "label": "Project stargazers_count, graphql-http",
      "display": "1.9K",
      "asOf": "2026-11-20"
    },
    "F252": {
      "label": "Library name, mercurius",
      "display": "Mercurius",
      "asOf": "2026-11-20"
    },
    "F253": {
      "label": "Monthly downloads, mercurius",
      "display": "1.3M",
      "asOf": "2026-11-20"
    },
    "F254": {
      "label": "License, mercurius",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F255": {
      "label": "Package release, mercurius",
      "display": "16.12.2",
      "asOf": "2026-11-20"
    },
    "F256": {
      "label": "Package release date, mercurius",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F257": {
      "label": "Install, mercurius",
      "display": "npm install mercurius fastify graphql",
      "asOf": "2026-11-20"
    },
    "F258": {
      "label": "Quickstart, mercurius",
      "display": "import Fastify from 'fastify';\nimport mercurius from 'mercurius';\n\nconst app = Fastify();\napp.register(mercurius, {\n  schema: 'type Query { hello: String }',\n  resolvers: { Query: { hello: () => 'world' } },\n});\nawait app.ready();\nconst result = await app.graphql('{ hello }');\nawait app.close();\n",
      "asOf": "2026-11-20"
    },
    "F259": {
      "label": "Repository stars, mercurius",
      "display": "2.5K",
      "asOf": "2026-11-20"
    },
    "F260": {
      "label": "HTTP request handler, mercurius",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F261": {
      "label": "Subscription transport, mercurius",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F262": {
      "label": "SDL schema building, mercurius",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F263": {
      "label": "Runtime role, mercurius",
      "display": "Fastify GraphQL server plugin with schema/resolver registration, loader and subscription interfaces.",
      "asOf": "2026-11-20"
    },
    "F264": {
      "label": "Host and peer requirements, mercurius",
      "display": "Supported Node ESM/top-level-await host, current compatible Fastify and GraphQL16/17 peer. Ready initializes plugin before its native decorated first query; no network listener.",
      "asOf": "2026-11-20"
    },
    "F265": {
      "label": "Project function, mercurius",
      "display": "export default async function findUsersResolver(fastify: FastifyRouteInstance) {\n  fastify.graphql.defineResolvers({\n    Query: {\n      findUsers: async (_, args) => {\n        const result = await fastify.queryBus.execute(findUsersQuery(validateArgs(args)));\n        return mapPage(result, fastify.diContainer.cradle.userMapper.toResponse);\n      },\n    },\n  });\n}\n",
      "asOf": "2026-11-20"
    },
    "F266": {
      "label": "Project source file, mercurius",
      "display": "src/modules/user/queries/find-users/find-users.resolver.ts",
      "asOf": "2026-11-20"
    },
    "F267": {
      "label": "Project full_name, mercurius",
      "display": "marcoturi/fastify-boilerplate",
      "asOf": "2026-11-20"
    },
    "F268": {
      "label": "Project stargazers_count, mercurius",
      "display": "476",
      "asOf": "2026-11-20"
    },
    "F269": {
      "label": "Builds an executable GraphQL.js schema from type definitions and a resolver map.",
      "display": "Builds an executable GraphQL.js schema from type definitions and a resolver map.",
      "asOf": "2026-11-17"
    },
    "F270": {
      "label": "Combines types from many files",
      "display": "Combines types from many files",
      "asOf": "2026-11-17"
    },
    "F271": {
      "label": "Split type definitions and resolvers across files and merge them into one schema.",
      "display": "Split type definitions and resolvers across files and merge them into one schema.",
      "asOf": "2026-11-17"
    },
    "F272": {
      "label": "Extends existing types",
      "display": "Extends existing types",
      "asOf": "2026-11-17"
    },
    "F273": {
      "label": "Add fields to the root Query and Mutation types with the extend keyword.",
      "display": "Add fields to the root Query and Mutation types with the extend keyword.",
      "asOf": "2026-11-17"
    },
    "F274": {
      "label": "Implements the GraphQL over WebSocket Protocol as a server and a client.",
      "display": "Implements the GraphQL over WebSocket Protocol as a server and a client.",
      "asOf": "2026-11-17"
    },
    "F275": {
      "label": "Runs many operations on one socket",
      "display": "Runs many operations on one socket",
      "asOf": "2026-11-17"
    },
    "F276": {
      "label": "Separate operation IDs let several operations share one connection at the same time.",
      "display": "Separate operation IDs let several operations share one connection at the same time.",
      "asOf": "2026-11-17"
    },
    "F277": {
      "label": "Needs graphql-ws on both sides",
      "display": "Needs graphql-ws on both sides",
      "asOf": "2026-11-17"
    },
    "F278": {
      "label": "Run graphql-ws on the server and the client rather than mixing it with subscriptions-transport-ws.",
      "display": "Run graphql-ws on the server and the client rather than mixing it with subscriptions-transport-ws.",
      "asOf": "2026-11-17"
    },
    "F279": {
      "label": "Wraps the GraphQL parse, validate, execute, and subscribe functions in a plugin system.",
      "display": "Wraps the GraphQL parse, validate, execute, and subscribe functions in a plugin system.",
      "asOf": "2026-11-17"
    },
    "F280": {
      "label": "Adds features as plugins",
      "display": "Adds features as plugins",
      "asOf": "2026-11-17"
    },
    "F281": {
      "label": "Register each feature, such as a parser cache, as a plugin on the base setup.",
      "display": "Register each feature, such as a parser cache, as a plugin on the base setup.",
      "asOf": "2026-11-17"
    },
    "F282": {
      "label": "No HTTP server included",
      "display": "No HTTP server included",
      "asOf": "2026-11-17"
    },
    "F283": {
      "label": "Pair Envelop with an HTTP framework or server for production traffic.",
      "display": "Pair Envelop with an HTTP framework or server for production traffic.",
      "asOf": "2026-11-17"
    },
    "F284": {
      "label": "Implements the GraphQL over HTTP spec as a server handler, a client, and an audit suite.",
      "display": "Implements the GraphQL over HTTP spec as a server handler, a client, and an audit suite.",
      "asOf": "2026-11-17"
    },
    "F285": {
      "label": "Plugs into Node.js HTTP servers",
      "display": "Plugs into Node.js HTTP servers",
      "asOf": "2026-11-17"
    },
    "F286": {
      "label": "createHandler returns a request handler for a Node.js HTTP server.",
      "display": "createHandler returns a request handler for a Node.js HTTP server.",
      "asOf": "2026-11-17"
    },
    "F287": {
      "label": "No subscriptions",
      "display": "No subscriptions",
      "asOf": "2026-11-17"
    },
    "F288": {
      "label": "Add graphql-ws or graphql-sse for subscriptions.",
      "display": "Add graphql-ws or graphql-sse for subscriptions.",
      "asOf": "2026-11-17"
    }
  },
  "dataCheckedAt": "2026-11-20",
  "agent": {
    "exaCall": {
      "endpoint": "/search",
      "body": {
        "query": "Best JavaScript GraphQL libraries GraphQL.js Apollo Server Yoga Mercurius code examples",
        "numResults": 5
      },
      "docsUrl": "https://exa.ai/docs/reference/search"
    },
    "calls": []
  }
}
