{"id":5637,"library":"graphql-server-core","title":"GraphQL Server Core","description":"graphql-server-core is a Python library that provides the core logic and utilities for building a GraphQL server, compatible with graphql-core. It handles request parsing, execution, and error formatting, acting as a foundation for framework-specific integrations. The current stable version is 2.0.0, but development has largely shifted to its successor, 'graphql-server' (v3.x).","status":"maintenance","version":"2.0.0","language":"python","source_language":"en","source_url":"https://github.com/graphql-python/graphql-server-core","tags":["graphql","server","core","deprecated","wsgi","asgi"],"install":[{"cmd":"pip install graphql-server-core","lang":"bash","label":"Install stable version"}],"dependencies":[{"reason":"Core GraphQL execution engine. Version 2.0.0 requires graphql-core>=3.1,<3.2.","package":"graphql-core","optional":false}],"imports":[{"wrong":"from graphql_server import create_app","symbol":"execute_graphql_request","correct":"from graphql_server import execute_graphql_request"},{"symbol":"GraphQLSchema","correct":"from graphql_server import GraphQLSchema"},{"symbol":"format_execution_result","correct":"from graphql_server import format_execution_result"}],"quickstart":{"code":"from graphql import build_schema\nfrom graphql_server_core import create_app\n\ndef resolve_hello(root, info):\n    return 'Hello from GraphQL-Server-Core!'\n\n# Define your GraphQL schema\nschema = build_schema('''\n    type Query {\n        hello: String\n    }\n''')\n\n# Attach a resolver to the 'hello' field\nschema.query.set_field('hello', resolve_hello)\n\n# Create a basic GraphQL application handler\n# For actual serving, this `app` object would be integrated with a WSGI/ASGI server\n# e.g., using Flask or FastAPI, which would require separate packages\napp = create_app(\n    schema=schema,\n    pretty=True, # Optional: format output nicely\n    enable_graphiql=False # Optional: disable GraphiQL interface\n)\n\n# Example of how to simulate a request (for demonstration, not a full server)\n# In a real application, a web framework would handle the request/response cycle.\n# This library primarily provides the 'app' handler.\n# print(\"App handler created, integrate with a web framework to serve.\")\n","lang":"python","description":"This quickstart demonstrates how to initialize a basic GraphQL application handler using `create_app`. For a fully functional server, this handler needs to be integrated with a web framework (like Flask, Django, etc.), which, for `graphql-server-core` v2.x, typically required additional framework-specific packages (e.g., `graphql-server-flask`)."},"warnings":[{"fix":"It is highly recommended to migrate to `graphql-server` (v3.x) for new projects and consider migration for existing `graphql-server-core` projects. The import paths and API for framework integration will differ significantly. Refer to the `graphql-server` documentation.","message":"The `graphql-server-core` package (v2.x) has been effectively superseded by `graphql-server` (v3.x). `graphql-server` is a refactored and consolidated library that bundles all framework integrations (Flask, Aiohttp, Sanic, etc.) directly into a single package, simplifying dependencies and usage.","severity":"breaking","affected_versions":"All versions of graphql-server-core (up to 2.x)"},{"fix":"Plan to use `graphql-server` (v3.x) instead, which provides a more modern and integrated solution for building GraphQL servers in Python.","message":"This `graphql-server-core` library is considered to be in maintenance mode, with active development having shifted to its successor, `graphql-server` (v3.x). While functional, it may not receive new features or extensive updates.","severity":"deprecated","affected_versions":"All versions of graphql-server-core"},{"fix":"If sticking with `graphql-server-core` v2.x, ensure you install the correct framework-specific integration package for your chosen web framework (e.g., `pip install graphql-server-flask`). If migrating, note that `graphql-server` v3.x handles these integrations differently and usually doesn't require separate `graphql-server-` packages.","message":"For `graphql-server-core` v2.x, integrating with specific web frameworks (like Flask or Aiohttp) required installing separate companion packages (e.g., `graphql-server-flask`, `graphql-server-aiohttp`). This is unlike `graphql-server` v3.x, where framework integrations are bundled.","severity":"gotcha","affected_versions":"graphql-server-core <= 2.0.0"},{"fix":"Ensure your environment has `graphql-core` installed within the specified range. If you need to use a newer `graphql-core` version (e.g., `3.2.x` or higher), you will likely need to migrate to `graphql-server` v3.x, which is built on a more recent `graphql-core` foundation.","message":"`graphql-server-core` v2.x specifically depends on `graphql-core>=3.1,<3.2`. Incompatibilities can arise if using other versions of `graphql-core`.","severity":"gotcha","affected_versions":"graphql-server-core <= 2.0.0"}],"env_vars":null,"search_vec":"'2.0.0':51 'act':37 'asgi':69 'build':20 'compat':24 'core':3,7,15,28,66 'current':47 'deprec':67 'develop':53 'error':35 'execut':33 'format':36 'foundat':40 'framework':43 'framework-specif':42 'graphql':1,5,22,27,61,64 'graphql-cor':26 'graphql-serv':60 'graphql-server-cor':4 'handl':30 'integr':45 'larg':55 'librari':11 'logic':16 'pars':32 'provid':13 'python':10 'request':31 'server':2,6,23,62,65 'shift':56 'specif':44 'stabl':48 'successor':59 'util':18 'v3.x':63 'version':49 'wsgi':68","created_at":"2026-04-14T03:37:16.294751+00:00","updated_at":"2026-04-16T15:27:59.668230+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"2.0.0","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/graphql-python/graphql-server-core","docs":null,"changelog":null,"pypi":"https://pypi.org/project/graphql-server-core/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["web-framework","serialization"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-07-03","last_verified":"2026-08-30","next_check":"2026-08-02","install_tag":null}}