Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(pyclient): add support for GraphQL API to 'get' method #4558

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

YpeZ
Copy link
Contributor

@YpeZ YpeZ commented Dec 11, 2024

What are the main changes you did

This PR adds functionality to the Pyclients get method to be able to retrieve data through the GraphQL API.
The following things need to be implemented before the PR is ready for review:

  • create parsing function to convert a table's metadata to a GraphQL query
  • implement the distinction between CSV and GraphQL API call in get
  • add columns parameter to get, specifying which columns need to be returned
  • add expand parameter to expand the query on reference columns to gather all columns from the referenced table
  • implement query filter on GraphQL query

How to test

  • explain here what to do to test this (or point to unit tests)

Checklist

  • updated docs in case of new feature
  • added/updated tests
  • added/updated testplan to include a test for this fix, including ref to bug using # notation

@YpeZ YpeZ changed the title feat(Pyclient): add support for GraphQL API to 'get' method feat(pyclient): add support for GraphQL API to 'get' method Dec 11, 2024
@YpeZ YpeZ linked an issue Dec 11, 2024 that may be closed by this pull request
@YpeZ YpeZ marked this pull request as draft December 11, 2024 15:52
@YpeZ YpeZ self-assigned this Dec 12, 2024
YpeZ added 3 commits December 17, 2024 17:12
* added column types to new constants.py
* started creating 'get_pkeys' for metadata.py
* finished '_parse_get_table_query' method
@YpeZ
Copy link
Contributor Author

YpeZ commented Dec 18, 2024

In my latest commit I implemented a filter on the columns of the output of get, i.e. get me the values of only these column of the table.
This leads to discrepancies between the results of the GraphQL and CSV API, as the columns of a table from the GraphQL API and the CSV API may differ. In my GraphQL query building I include REFBACKs whereas the CSV API does not.

This and my expectation that the implementation of the query_filter for GraphQL will differ significantly from the CSV one makes me consider separating these methods into a method for each API, as for the user the arguments they fill in for either format will differ significantly.

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

Successfully merging this pull request may close these issues.

feat(Pyclient): enable get method to retrieve data from GraphQL API
1 participant