Skip to content

Remove unnecessary graph_context usage in BigQuery#4116

Open
Yash (yashupadhyayy1) wants to merge 1 commit into
langchain-ai:mainfrom
yashupadhyayy1:main
Open

Remove unnecessary graph_context usage in BigQuery#4116
Yash (yashupadhyayy1) wants to merge 1 commit into
langchain-ai:mainfrom
yashupadhyayy1:main

Conversation

@yashupadhyayy1
Copy link
Copy Markdown

Summary

Fixes broken code example in the BigQuery callback handler integration docs.

Closes #3509

Problem

With langchain-google-community==3.0.5, the Use with LangGraph Agent
section raises two errors:

Error 1graph_name is not a valid constructor parameter:
TypeError: BigQueryCallbackHandler.init() got an unexpected keyword argument 'graph_name'

Error 2graph_context() method does not exist:
AttributeError: 'BigQueryCallbackHandler' object has no attribute 'graph_context'

[screenshot attached below]

Root Cause

The docs example references graph_name and graph_context() which were
never part of the BigQueryCallbackHandler API in v3.0.5.

Actual constructor signature:
BigQueryCallbackHandler(project_id, dataset_id, table_id=None, config=None)

Fix

  • Removed non-existent graph_name argument from constructor
  • Removed non-existent graph_context() context manager
  • Handler is passed directly via config={"callbacks": [handler]}
Screenshot 2026-05-21 095315

@github-actions
Copy link
Copy Markdown
Contributor

Thanks for opening a docs PR, Yash (@yashupadhyayy1)! When it's ready for review, please add the relevant reviewers:

  • @mdrxy (Python integrations)

@github-actions github-actions Bot added langchain For docs changes to LangChain oss python For content related to the Python version of LangChain projects external User is not a member of langchain-ai labels May 21, 2026
@yashupadhyayy1
Copy link
Copy Markdown
Author

mdrx, please take a review on this error with potential solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external User is not a member of langchain-ai langchain For docs changes to LangChain oss python For content related to the Python version of LangChain projects

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[langchain]: Bigquery callback handler integration Code Example does not work

1 participant