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

Consider whether dataSources needs to continue to be part of apollo-server-core #4950

Closed
glasser opened this issue Feb 23, 2021 · 2 comments
Closed

Comments

@glasser
Copy link
Member

glasser commented Feb 23, 2021

The DataSource API was added to AS a few months before the new plugin API.

As it turns out, basically everything you can do with a DataSource you can also do with a plugin.

In the interest of keeping Apollo Server's API simple, I'd like to experiment with seeing if DataSources could just be a plugin rather than a core part of the AS API in AS3.

This wouldn't be removing the functionality entirely; it would just be a change from

new ApolloServer({dataSources: {x: new XDataSource()}})

to

new ApolloServer({plugins: [ApolloServerPluginDataSources({x: new XDataSource()})]})

We would introduce the new plugin as an alternative in v2 and remove the old version in v3.

@glasser glasser added this to the Release 3.x milestone Feb 23, 2021
@glasser
Copy link
Member Author

glasser commented Jun 10, 2021

I really don't think we need the top-level dataSources option in AS3, but in the interest of scope I'll leave it in for now and remove this from the AS3 project.

@glasser glasser removed this from the Release 3.x milestone Jun 10, 2021
@trevor-scheer
Copy link
Member

We got rid of dataSources 🥳

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants