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

Add the GraphQL endpoint support #180

Closed
andrii-bodnar opened this issue Nov 13, 2024 · 4 comments · Fixed by #189
Closed

Add the GraphQL endpoint support #180

andrii-bodnar opened this issue Nov 13, 2024 · 4 comments · Fixed by #189
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@andrii-bodnar
Copy link
Member

Crowdin API client doesn't support the GraphQL endpoint yet. We should add support for it in this API client.

References:

@andrii-bodnar andrii-bodnar added enhancement New feature or request good first issue Good for newcomers labels Nov 13, 2024
@imprvhub
Copy link
Contributor

Hi @andrii-bodnar! i would like to contribute to this issue, can you assign me? Thanks!

@imprvhub
Copy link
Contributor

imprvhub commented Nov 30, 2024

@andrii-bodnar, I see two possible approaches for implementing GraphQL support:

  1. Adding it directly to the CrowdinClient class (for example in client.py and requester.py)
  2. Creating a new module under api_resources following the project's pattern (for example:
    crowdin_api/api_resources/graphql/
    ├── _ _ init _ _.py
    ├── resource.py
    ├── types.py
    ├── tests/
    └── test_graphql_resources.py)

Which approach would you prefer? Thanks!

@andrii-bodnar
Copy link
Member Author

@imprvhub I like the first approach. Also, it's something similar to what we have in JS API Client

imprvhub added a commit to imprvhub/crowdin-api-client-python that referenced this issue Dec 2, 2024
-Add GraphQL method to CrowdinClient for interfacing with the GraphQL endpoint.
-The implementation supports query strings and optional variables.
-Includes comprehensive test coverage for request validation.

Implements crowdin#180
@imprvhub
Copy link
Contributor

imprvhub commented Dec 2, 2024

@andrii-bodnar It's done! Let me know if you have any suggestions for corrections.

@andrii-bodnar andrii-bodnar linked a pull request Dec 3, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants