rysuds/dunebuggy

[BUG] Pydantic model `QueryParameter` not returning json dict in `GraphQLQuerier.post_graph_ql`

Opened this issue · 0 comments

Problem

  • When trying to run code cell 1 in example notebook, it complains about TypeError: Object of type QueryParameter is not JSON serializable.
  • Seems to me like when we have query with parameters, the QueryParameter pydantic model is not returned as json dict before GraphQLQuerier.post_graph_ql function happens.
  • Hence in httpx request, it is unable to encode parameters which is a list of QueryParameter objects rather than json text.

Screenshot

dunebuggy_bug

How to replicate the problem?

  • I use poetry to install based on pyproject.toml from this repo and simply run the example

Potential solutions