https://discord.cloudflare.com logo
Join Discord
Powered by
# r2
  • j

    john.spurlock

    04/30/2022, 2:08 PM
    i usually just send graphql queries constructed myself and process the response as any other json api, no generic framework needed for a known query or two
  • d

    darrennotfound

    04/30/2022, 2:08 PM
    But json needs ram right
  • d

    darrennotfound

    04/30/2022, 2:08 PM
    And converting also
  • i

    Isaac McFadyen | YYZ01

    04/30/2022, 2:09 PM
    Like a tiny amount.
  • d

    darrennotfound

    04/30/2022, 2:09 PM
    Well it's still ram
  • i

    Isaac McFadyen | YYZ01

    04/30/2022, 2:09 PM
    There's no API that works without JSON, so that's your only option.
  • i

    Isaac McFadyen | YYZ01

    04/30/2022, 2:09 PM
    Yeah but like maybe 2-4Mb?
  • d

    darrennotfound

    04/30/2022, 2:09 PM
    Json is ok
  • d

    darrennotfound

    04/30/2022, 2:09 PM
    But graphql
  • d

    darrennotfound

    04/30/2022, 2:09 PM
    Is hard to parse
  • i

    Isaac McFadyen | YYZ01

    04/30/2022, 2:09 PM
    GraphQL can be used with just regular JSON.
  • j

    john.spurlock

    04/30/2022, 2:10 PM
    eh its not so bad, you can summarize by time period to cut down on the data size you get back
  • d

    darrennotfound

    04/30/2022, 2:10 PM
    Isn't graphql a different thing than json
  • i

    Isaac McFadyen | YYZ01

    04/30/2022, 2:10 PM
    No.
  • i

    Isaac McFadyen | YYZ01

    04/30/2022, 2:10 PM
    GraphQL is just a format of JSON.
  • i

    Isaac McFadyen | YYZ01

    04/30/2022, 2:11 PM
    So you send a request, you get back json like
    Copy code
    {
      "query": {...data}
    }
  • j

    john.spurlock

    04/30/2022, 2:11 PM
    worst case you could build a worker to do it : ) but an rpi can process json just fine in my experience
  • d

    darrennotfound

    04/30/2022, 2:11 PM
    Wait a minute But it does return lots of unsessary field
  • i

    Isaac McFadyen | YYZ01

    04/30/2022, 2:11 PM
    No it doesn't.
  • i

    Isaac McFadyen | YYZ01

    04/30/2022, 2:11 PM
    With GraphQL you can filter the fields you get back.
  • i

    Isaac McFadyen | YYZ01

    04/30/2022, 2:11 PM
    That's the point of GraphQL.
  • i

    Isaac McFadyen | YYZ01

    04/30/2022, 2:11 PM
    Also @darrennotfound we should move to #812577823599755274 if we keep discussing this.
  • j

    john.spurlock

    04/30/2022, 3:36 PM
    this morning I tried getting litestream (sqlite replication) working with r2
  • j

    john.spurlock

    04/30/2022, 3:36 PM
    good news and bad news
  • j

    john.spurlock

    04/30/2022, 3:37 PM
    good news is that, it currently works!
  • j

    john.spurlock

    04/30/2022, 3:37 PM
    bad news is that it requires
    ListObjects
    v1, which is not supposed to be implemented right now in R2, and is only kind of working due to a bug : (
  • j

    john.spurlock

    04/30/2022, 3:38 PM
    added details on litestream config here: https://gist.github.com/johnspurlock-skymethod/6027c81953f81aa535d889d86a1061ba#litestream-sqlite-replication
  • j

    john.spurlock

    04/30/2022, 3:39 PM
    at this point i would consider proper support for
    ListObjects
    v1 to be a high priority fix before any wider r2 release
  • v

    Vitali

    04/30/2022, 4:34 PM
    Is the main difference that start-after is called marker and there’s no continuation token?
  • v

    Vitali

    04/30/2022, 4:59 PM
    Or I guess marker is a mix of both
1...868788...1050Latest