Great job! I hope core team bold this out, this is huge good news!

4 days later

@tyvdh I had this same idea today (building a GraphQL layer on top of the ledger). I hadn't thought of using postgraphql, though.

If you're willing to open the project up to receive contributions, I'd be happy to be part of it!

If not, it'd be great to keep in touch anyway, since I plan to put together a UI that allows the blockchain to be visualised as a graph structure.

    codesmithtech Awesome! Definitely planning on opening this up and will be looking for help.

    21 days later

    Can we have some examples on how to use this?

      19 days later
      query {
        allHistoryOperations(first: 1, filter: { details: { equalTo: "{ selling_asset_code: \"USD\" }" } }) {
          nodes {
            transactionId
            details
            type
          }
        }
      }

      tyvdh
      I'm trying that query in your https://horizon-test.gly.sh/graphiql and it doesn't work correctly (no data). What I'm missing here?

      Thank you.

      Edit: actually, filtering by details doesn't seem to work as expected.

        jfuentes Got it. The maintainer of the filter plugin had to make some changes.

        query {
          allHistoryOperations(
            first: 1, 
            filter: { 
              details: { 
                contains: { 
                  selling_asset_code: "USD" 
                } 
              }
            }
        	) {
            nodes {
              transactionId
              details
              type
            }
          }
        }

        That should do the trick now.

        Hey @tyvdh, I was playing a bit with the horizon-test and it went down ?.

        Could you please take a look at it?

        Thank you!

          jfuentes No worries. Back up now. There aren't a whole lot of checks in place atm so if you make a request which returns a MASSIVE amount of data or an overly complex filter the app may crash.

          Need to get some checks and auto rebooting in place.

          Hey Tyler this is absolutely beautiful! Forgive my ignorance about GraphQL but where can we get a list of all entities/fields in order to build some queries? This stuff is amazing!

          * facepalm * Top/right there is a Docs link

            Thanks, I'm in love!

            Hey quick question, can we submit queries using plain http POST? Is there any API endpoint for that? I played with the web UI which is cool but I'd like to make a query once in a while from a program to check for trustlines which is something StellarSDKs lack and it is in urgent need the more tokens get created. Someday when I grow up I'll get my own node and your posts are perfect guides for that but for now I'd be more than happy to hit your service once a day while I get used to server stuff.

            * To expand, I saw the links to https://api-test.gly.sh and https://api.gly.sh but do they get graphiql queries in the post body so we get the same responses as the web UI? The ones I tried are just proxies to horizon responses which is not what I want.