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

Create HTTPConnector interface for all API interactions #317

Open
MeltyBot opened this issue Jan 29, 2022 · 1 comment · May be fixed by #1649
Open

Create HTTPConnector interface for all API interactions #317

MeltyBot opened this issue Jan 29, 2022 · 1 comment · May be fixed by #1649

Comments

@MeltyBot
Copy link
Contributor

Migrated from GitLab: https://gitlab.com/meltano/sdk/-/issues/319

Originally created by @edgarrmondragon on 2022-01-29 01:38:55


Summary

Currently, for HTTP taps (REST, GraphQL, etc.), all aspects of making a request go through the stream class. This works well for most access patterns where one endpoint corresponds to one stream. However, there are other use cases that require making requests not with the direct purpose of yielding records.

Proposed benefits

Proposal details

  • Build a module dedicated to HTTP sources, i.e. singer_sdk.http.

    • singer_sdk.http.connector contains the HTTPConnector class. In the MVC, HTTPConnector would manage aspects that the exiting stream classes do not, like the Session object.

    • singer_sdk.http.streams.base. In the MVC, methods useful to both GraphQL and REST streams can be moved to HTTPStream in this module without introducing breaking changes.

    • singer_sdk.http.streams.rest moved from singer_sdk.streams.rest

    • singer_sdk.http.streams.graphql moved from singer_sdk.streams.grapql

    • singer_sdk.http.authenticators moved from singer_sdk.authenticators

    • singer_sdk.http.paginators new module if https://gitlab.com/meltano/sdk/-/issues/318+ is implemented.

Best reasons not to build

This would not add any new features for existing taps and only counts as addressing maintainability and extensibility (encourage contributions).

@MeltyBot
Copy link
Contributor Author

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

Successfully merging a pull request may close this issue.

2 participants