steamclock / netable

A Swift library for encapsulating network APIs using Codable in a type-oriented way.
MIT License
99 stars 3 forks source link

GraphQL improvements #101

Closed brendanlensink closed 1 year ago

brendanlensink commented 1 year ago

After spending some more time switching another project onto Netable for all the GraphQL requests, I've found a couple improvements that could be made in the existing code

  1. Remove the need for GraphQLMutation and GraphQLQuery - turns out we don't really need most of the reasons I split it off in the first place, so I've just merged them back into GraphQLRequest
  2. Clean up and fix up parameter encoding a little
  3. Add a default for query parameter inputs to make them pseudo-optional for queries.