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

createNetworkInterface does not work as documented in 0.5.0 #806

Closed
eagsalazar opened this issue Oct 18, 2016 · 4 comments
Closed

createNetworkInterface does not work as documented in 0.5.0 #806

eagsalazar opened this issue Oct 18, 2016 · 4 comments

Comments

@eagsalazar
Copy link

In generated js on npm, transport/networkinterface.js has this code:

function createNetworkInterface(interfaceOpts) {
    var _a = interfaceOpts || {}, _b = _a.opts, opts = _b === void 0 ? {} : _b, uri = _a.uri;
    return new HTTPFetchNetworkInterface(uri, opts);
}

Documentation says we can pass interface opts like this:

const networkInterface = createNetworkInterface(
  `${Config.REINDEX_URL}/graphql`
)

Which does not work as uri is not set. This results in this error:
ExceptionsManager.js:62 A remote enpdoint is required for a network layer

Doing this instead does work:

const networkInterface = createNetworkInterface({
  uri: `${Config.REINDEX_URL}/graphql`
})
@helfer
Copy link
Contributor

helfer commented Oct 18, 2016

@eagsalazar Are you intentionally running the prerelease or did you just run npm install and got 0.5.0-1? If you did it intentionally, thanks a lot for helping us iron out the kinks! Would you mind making a PR to update the docs? 🙂

@eagsalazar
Copy link
Author

Huh, I just did npm install, I think... Anyway, sure.

On Tue, Oct 18, 2016 at 12:03 PM, Jonas Helfer notifications@github.com
wrote:

@eagsalazar https://github.com/eagsalazar Are you intentionally running
the prerelease or did you just run npm install and got 0.5.0-1? If you
did it intentionally, thanks a lot for helping us iron out the kinks! Would
you mind making a PR to update the docs? 🙂


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#806 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAL1XlJSv5--FDikI2l0_9w0CJVQs6kmks5q1RgJgaJpZM4KaKcZ
.

@helfer
Copy link
Contributor

helfer commented Oct 18, 2016

actually, nvm, it seems someone already made a PR: https://github.com/apollostack/react-docs/pull/78

@helfer
Copy link
Contributor

helfer commented Oct 18, 2016

@eagsalazar oh, ok. It seems we temporarily didn't have the correct release marked as latest. For the time being, you should install 0.4.21, which is be the latest recommended version.

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