Mapping GraphQL types to Swift – Apollo GraphQL

Mapping GraphQL types to Swift 
#js #graphql #reactjs #swift #ios @martijnwalraven

  • Apollo iOS takes advantage of this type information to map responses to Swift types.
  • The type models suffer from the same issue mentioned above: most requests will only contain a subset of the data defined in these types.
  • With GraphQL, the equivalent approach would be to define a model type for every type defined in your schema.
  • With the approach, there would be a Post type containing all fields returned for posts, for example, and JSON results from individual endpoints are parsed into instances of this type.
  • All primitive GraphQL types have a natural mapping to a corresponding Swift type.

We recently released the first version of Apollo iOS, a strongly-typed GraphQL client for Swift apps. I’ve written about bringing GraphQL to iOS before, but in this post I’d like to go into more…
Continue reading “Mapping GraphQL types to Swift – Apollo GraphQL”

Tony Spiro

JSON Powers The World  #javascript #webdev #angularjs #nodejs #php #RubyonRails #reactjs

  • Notice we have a couple values (array and object) that can nest other values.
  • When we want to request different values from this JSON object, we would simply “namespace” our values.
  • JSON provides the information for the world in which we live.
  • It is in the simple structure, nestable and non-nestable values, that JSON provides so much value.
  • An Object – can nest other values 6. null

Read the full article, click here.

@tonyspiro: “JSON Powers The World #javascript #webdev #angularjs #nodejs #php #RubyonRails #reactjs”

We live in a time when APIs rule the land.  APIs power our world of information from our phones to our desktops to our watches and even our cars.   Every connected device you can think of hooks up to an API for its data DNA.  In our continuously changing environment of programming languages and devices, APIs are the one thing we’ve come to rely on to be the constant.  And in the world of APIs, there is one king of formats and that is JSON.  In this article I’m going to give you a brief introduction to JSON and touch on some of the reasons why it’s been chosen to power our world.

Tony Spiro