Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Please document SchemaLink constructor #339

Open
calocan opened this issue Dec 15, 2017 · 2 comments
Open

Please document SchemaLink constructor #339

calocan opened this issue Dec 15, 2017 · 2 comments

Comments

@calocan
Copy link

calocan commented Dec 15, 2017

I had to troll through the code to figure out that SchemaLink accepts a context in the constructor. I don't see this documented anywhere. Are any of the Link subclass constructors documented, or is the superclass constructor documented?

Intended outcome:
When I use a class that is part of the Apollo API, all of the method parameters, including the constructor, are documented

Actual outcome:
SchemaLink is not documented this way

How to reproduce the issue:
Try to use SchemaLink with an ApolloClient. Instantiate the client and run client.query() using resolvers that require context. Context is undefined because SchemaLink is not documented to accept a context.

@sheerun
Copy link

sheerun commented Jan 10, 2018

This is bad and bit me as well. How to set context when using SchemaLink?

@sheerun
Copy link

sheerun commented Jan 10, 2018

And why doesn't schemaLink doesn't receive context passed from query, at least as a default?

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

No branches or pull requests

3 participants