Skip to content

Instantly share code, notes, and snippets.

@idibidiart
Last active February 16, 2016 02:21
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save idibidiart/04e4cf24e5d2c7aba92c to your computer and use it in GitHub Desktop.
Save idibidiart/04e4cf24e5d2c7aba92c to your computer and use it in GitHub Desktop.
GraphQL/Relay
@BenGale
Copy link

BenGale commented Feb 10, 2016

Seems spot on.

I've recently done a project where I used redux-forms to manage form state (validation, etc.) and that's the only place off the top of my head where I feel I'd still need redux. I need to sit down and see if I can hack out something that would replace all that in a simpler way.

Where you mention debugging relay with GraphiQL being too low level, I guess you mean because of the separation of fragments. In the browser though you can grab the request made to the server which should have the complete query. I've been dumping those into GraphiQL to see what's going on.

@idibidiart
Copy link
Author

@BenGale

I see. that makes a lot of sense. I'm actually just starting out and wanted to make sure I have the whole concept down! Thank you for your feedback :)

Updated:
(after a Twitter chat with @en_JS (Joseph Savona), one of the GraphQL/Relay developers at Facebook)

Any app state that is not sync'd to the db is not something that Relay encompasses right now, but there is an ongoing
discussion (facebook/relay#114) for handling things like form validation where the validation logic resides on the server
and state updates from sources other than the db (e.g. websocket)

These important scenarios will be addressed according to the Relay Roadmap (https://github.com/facebook/relay/wiki/Roadmap):

  1. API for resolving fields locally: #431.
  2. Support querying & compiling client-only fields by extending the server schema, and a means for writing data for these
    fields into the cache: #114.

@nhavar
Copy link

nhavar commented Feb 11, 2016

Are there any security implications related to the adoption of GraphQL?

@idibidiart
Copy link
Author

@nhavar I am sure that there are edge cases that have potential security implications. At least you can't do SQL injection :) but I imagine that you'd have to be careful in how you write your query resolvers. Good question.

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