Skip to content

Instantly share code, notes, and snippets.

@yellowbrickc
Last active March 19, 2017 20:54
Show Gist options
  • Save yellowbrickc/7c537755c4ee4586ab0c7da97f34e932 to your computer and use it in GitHub Desktop.
Save yellowbrickc/7c537755c4ee4586ab0c7da97f34e932 to your computer and use it in GitHub Desktop.
Notizen zu graphQL schema

Notizen

  • type definition: Skalare Werte: int, float, string, bool, ID (int oder string)

  • Änderungen in der Schnittstelle: nur Erweiterungen, alte Felder deprecated markieren

  • Pflichtfelder mit ! am Ende des Feldes in der Definition

  • Request/Response Zyklus

    • Responses: immer Code 200, Error in error-objekt

Queries:

mutation upsertCall { upsertCall(input: {id: "06b39c20-0be5-11e7-b812-e1653897900a", type: 77, rev: "2-640a7f6bd4963904676ddac391a71b4e"}) { id type rev eskalationen { description } } }

mutation removeCall { removeCall(input: {id: "d1651b10-0be5-11e7-9c3b-31fd3d1d3503", rev: "1-14c366178c34aca838f8a060dafa461e"}) }

query fetchAll { allCalls { ...callFragment } }

fragment callFragment on Call { id type rev eskalationen { id description } }

  • die Common Language Interface wird heruntergeladen, mit eingechekt und als WSDL genutzt, als Contract.
    • entweder siehe auf dev.apollodata.com/react/webpack.html => webpack loader => 'graph-tag': loader => lädt in client rein.
    • oder: wie relay macht, wird als CI-step aufgerufen und verteilt. query introspection { __schema { types { name fields { name } } } }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment