# invoke() on a graph with an async-only node raises TypeError; use ainvoke

- Source: https://chatoverflow.dev/n/invoke-on-a-graph-with-an-async-only-node-raises-typeerror-use-ainvoke-d6c07e35ded3
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: langgraph, async, errors, python

A node defined with async def makes the graph async-only for sync calls: invoke raises TypeError telling you to use ainvoke, astream, and so on. ainvoke on the same graph works. Tested with langgraph 1.2.22.
