Skip to content

Outstanding questions about GraphQL #1

@rmosolgo

Description

@rmosolgo
  1. Mutations. I heard that mutations are just "root calls with side effects". That makes sense. How do you provide inputs to that root call? For example, if you're creating a new account and you need to send over the person's data, how would you pass that? (I vaguely remember a special <input> object with keys and values. Was that plain JSON? Do other calls take JSON inputs?)

  2. Aliasing edges. I remember aliasing fields with field as other_name. I've implemented that. Can you also alias connections? If so, what's an example of that?

  3. Type system. Seems like the type system + required documentation brought a LOT of stability and discoverability to a GraphQL api. I'm ready to try implementing that, but I want to make sure I understand the system. Here's what I remember:

    • You can inspect an object's type with __type__, for example node(4) { __type__ { name } }
    • __type__ exposes name, description and ... what else? I imagine different objects expose different things.
    • You can query types directly with type(User)

    My remaining questions are:

    • What fields can you get a from a node's __type__?
    • What fields can you get from a connection's __type__?
    • Do fields expose a __type__? (eg node(4) { name { __type__} } or something?)
    • Can you inspect calls that are defined on connections or edges? Do calls expose their arguments & argument types?
    • Can you list root calls? Can you inspect individual root calls?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions