-
Notifications
You must be signed in to change notification settings - Fork 145
Open
Description
Hello everyone,
I was wondering whether we have to update the resolve function to parse the meta & stats? At the moment, this is not accessible:
irb(main):020:0> resource_klass.adapter
=> Graphiti::Adapters::GraphitiAPI
irb(main):021:0> resource_klass.all(stats: { total: 'count' }).meta
=> {}
irb(main):022:0> resource_klass.all(stats: { total: 'count' }).stats
=> {:total=>{:count=>nil}}graphiti/lib/graphiti/adapters/graphiti_api.rb
Lines 8 to 20 in e3cffe4
| def resolve(scope) | |
| url = build_url(scope) | |
| response = resource.make_request(url) | |
| json = JSON.parse(response.body) | |
| if json["errors"] | |
| handle_remote_error(url, json) | |
| else | |
| models = json["data"].map { |d| build_entity(json, d) } | |
| Util::RemoteSerializer.for(resource.class.serializer, models) | |
| models | |
| end | |
| end |
Metadata
Metadata
Assignees
Labels
No labels