Hacker News new | ask | show | jobs
by jankassens 3354 days ago
Hey, Jan here together with Lee from the Relay team. Happy to answer your questions.
5 comments

1. Could you two do a Reactiflux Q&A?

2. Are people on the Relay OSS team willing to answer StackOverflow-type questions on a certain time?

- I would want to be able to programmatically run relay-compiler. Every time I update my client-side code, webpack detects the change and then runs relay-compiler.

- And get help figure out some errors related to mutations I'm encountering. I wouldn't want to post these type of things as a GitHub issue because it could technically not be a bug.

Hi, I'm Lee from the GraphQL/Relay team

1. Reactiflux Q&A is a great idea, perhaps someone who organizes that can help set that up.

2. We're a pretty small team and our primary focus is building great software for Facebook and the larger community, so unfortunately our ability to focus on answering questions is relatively limited. Many people on the team occasionally hop into StackOverflow to answer questions, but we definitely can't make any guarantees about answering them all or answering them in a certain amount of time.

You can run relay-compiler as part of your webpack config as a pre-compile step. Also, if you want to run relay-compiler while you're iterating on your code, pass --watch and it will rerun whenever a file is saved.

Hi Lee, Vince here from Scaphold.io.

I can help put you in touch with the guys who run the channel and manage the Q&As. We're actually doing one ourselves on April 27.

I'll reach out on the GraphQL Slack channel.

Congrats on the release. Could you summarize the pros and cons of picking Relay Modern vs Apollo Client?
Here is a detailed comparison between Apollo and Relay: https://www.graph.cool/docs/tutorials/relay-vs-apollo-iechu0...

(Note: This article hasn't been updated for Relay Modern yet but the main points are still the same.)

I think the comparison is going to be pretty different for Modern because Relay Modern has some significant changes in the approach.
You're absolutely right, we're already working on an updated version. We'd love to have Apollo's feedback on it to make it as helpful as possible!
Is it possible to use Relay along with Golang backend that serves graphQL queries via web socket?
Thanks Jan, what are the remaining pain points to your opinion with the usage of Relay in a modern web app?
We've moved from runtime generation of queries to 100% of queries generated at compile time to remove a large chunk of computation out of runtime. Some APIs got more complicated to use than I'd like to. For example, pagination currently requires developers to write an explicit query to fetch more entries. Now with performance in good shape, I want to focus on improving the developer experience again in a way that doesn't sacrifice runtime speed. For example for pagination, we should in most cases be able to synthesize a query at compile time instead of asking for an explicit query.
Thanks Jan. Will there be support for websockets?
Hi, I'm Joe also on the Relay team.

Relay Modern (as with previous versions) supports an injectable network layer. This allows each application to customize how to communicate with its GraphQL server using whatever transport protocol is most appropriate (for example you might use HTTP for queries/mutations and WebSockets for subscriptions).