LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • LangGraph Checkpoint
    LangGraph Store
    Checkpoint Postgres
    Store Postgres
    Checkpoint SQLite
    LangGraph Prebuilt
    LangGraph CLI
    LangGraph SDK
    LangGraph Supervisor
    LangGraph Swarm
    ⌘I

    LangChain Assistant

    Ask a question to get started

    Enter to send•Shift+Enter new line

    Menu

    LangGraph Checkpoint
    LangGraph Store
    Checkpoint Postgres
    Store Postgres
    Checkpoint SQLite
    LangGraph Prebuilt
    LangGraph CLI
    LangGraph SDK
    LangGraph Supervisor
    LangGraph Swarm
    Language
    Theme
    Pythonlanggraph-clischemasHttpConfigmiddleware_order
    Attribute●Since v0.4

    middleware_order

    Copy
    middleware_order: MiddlewareOrders | None
    View source on GitHub

    Optional. Defines the order in which to apply server customizations.

    Choices:

    • "auth_first": Authentication hooks (custom or default) are evaluated before custom middleware.
    • "middleware_first": Custom middleware is evaluated before authentication hooks (custom or default).

    Default is middleware_first.