Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Oct 04 10:46
    raulk removed as member
  • Jan 13 10:12
    CLAassistant commented #157
  • Jan 13 10:12
    dependabot[bot] labeled #157
  • Jan 13 10:12
    dependabot[bot] opened #157
  • Jan 13 10:12

    dependabot[bot] on npm_and_yarn

    Bump follow-redirects from 1.7.… (compare)

  • Dec 17 2021 02:10
    guirkgumbo commented #132
  • Nov 08 2021 18:27
    CLAassistant commented #156
  • Nov 08 2021 18:27

    dependabot[bot] on npm_and_yarn

    (compare)

  • Nov 08 2021 18:27
    dependabot[bot] closed #135
  • Nov 08 2021 18:27
    dependabot[bot] commented #135
  • Nov 08 2021 18:27
    dependabot[bot] labeled #156
  • Nov 08 2021 18:27
    dependabot[bot] opened #156
  • Nov 08 2021 18:27

    dependabot[bot] on npm_and_yarn

    Bump apollo-server from 2.4.2 t… (compare)

  • Sep 21 2021 01:43
    CLAassistant commented #155
  • Sep 21 2021 01:43
    dependabot[bot] labeled #155
  • Sep 21 2021 01:43
    dependabot[bot] opened #155
  • Sep 21 2021 01:43

    dependabot[bot] on npm_and_yarn

    Bump tmpl from 1.0.4 to 1.0.5 … (compare)

  • Sep 20 2021 23:19
    CLAassistant commented #154
  • Sep 20 2021 23:19

    dependabot[bot] on npm_and_yarn

    (compare)

  • Sep 20 2021 23:19
    dependabot[bot] closed #153
DJosey
@djosey
ill try that again
Kris Shinn
@kshinn
I found a simple script that demonstrating access from node.js, I'll update the examples repo.
DJosey
@djosey
ok, that would be extremely helpful, thanks!
DJosey
@djosey
thanks a lot, i'll give this a go!
it worked, thank you :D
Kris Shinn
@kshinn
np, happy hacking!
DJosey
@djosey

hm, no more errors but now having some difficulty getting a response returned with different queries. @kshinn idk if its a graphql problem or an HTTP problem but would you have any idea why I would get responses that look like this

{ data: { blocks: [ [Object], [Object], [Object], [Object] ] } }

with [Object] being returned instead of the block numbers that I queried?

Had the same problem with [Array] being returned in place of a response that would have been typed as an array

Kris Shinn
@kshinn
If you are doing a console.log to get that output, you'll need something that unrolls nested objects
DJosey
@djosey
ok
Kris Shinn
@kshinn
like if you were to do data.blocks.map((blk) => console.log) that would print the individual objects... The other thing you can do is try and stringify it into JSON using something like JSON.stringify to print.
DJosey
@djosey
that works!
Scott Street
@sprusr
Does EthQL not yet implement some of the queries available in the EIP? For example call - this would be quite handy for me right now. But looks like if I use geth I can get this?
Kris Shinn
@kshinn
The endpoint that is up does not yet support the Mutation queries yet.
It is a feature that is on the roadmap!
Scott Street
@sprusr

Nice. Started to get some stuff coming together now with client side schema transforms with apollo-client, the idea being that I can write a query like:

{
  SimpleStorage {
    get
  }
}

Which with knowledge of the contract ABI will transform the query to use call as defined in the EIP. I think it'll be cool to get this working, perhaps not the best approach though. I have limited knowledge of gql, but perhaps there is some way to do this on the node/server side and provide the required ABI details per query. But on with the hacking regardless :)

I wanted to do some stuff with event parsing too, but having to quickly learn a lot about gql has been a barrier to that being completed this weekend I think!
Nick Johnson
@Arachnid
@sprusr @raulk The thing that still needs doing is to make sure that geth and ethql are in sync as to what the schema looks like. Last I checked there were still some discrepancies.
I tried to conform to the ethql schema as closely as possible, but there were some parts where deviations were inevitable. I think I raised them individually at the time.
@sprusr Personally I don't think that's the right split of responsibility. ABI encoding isn't a part of Ethereum that the node needs to know about, it's just a contract convention. The graphql interface can be equally powerful working just with binary encoded queries and responses and doing the transformations in the client.
Scott Street
@sprusr

Right, the differences between EthQL and geth were confusing at first. The biggest thing was lack of call or mutations in EthQL, but from above sounds like they are coming.

And I guess I agree with the idea that ABI encoding should be kept out of the node. That is actually the approach I’ve been taking, with some (messy) query/schema transforms using apollo-client. But I’m thinking there may be certain queries not possible (or with many repeated queries from the client to resolve) without some degree of decoding on the server.

Oh I also wondered about the Long vs BigNumber types in the geth implementation. Why use one over the other? Why for example can I not pass a number string as blockNumber argument to the block query? (It must currently be a hex string)
Kris Shinn
@kshinn
@Arachnid I started going through some of the differences to make some notes, but I haven't completely finished my analysis. I'll review the notes earlier in this chat as well; I remember seeing them before. The intent on my part is leaning toward compromising and aligning the differences so that Ethql as the sidecar (and the client side implementations) can overlay the standard spec to give a more custom / flexible experience. Where would the best place to engage on that topic? Here or the github EIP?
Scott Street
@sprusr

@kshinn heads up that we'll be continuing development on the client-side wrapper project over here: https://github.com/sprusr/ethpollo

Aiming to get queries/contract function calls working well as a first course of action. Contract schema generation is pretty much done for queries, bulk of the upcoming work will be on the transforms - doesn't seem like it will be so easy! Going to be an evening/weekend project for me, but hopefully will have something to show soon :)

Nick Johnson
@Arachnid

@sprusr Oh I also wondered about the Long vs BigNumber types in the geth implementation. Why use one over the other? Why for example can I not pass a number string as blockNumber argument to the block query? (It must currently be a hex string)

It reflects the underlying datatypes. Block numbers will never exceed 2^64-1, so no need for them to be bignums.

@kshinn The intent on my part is leaning toward compromising and aligning the differences so that Ethql as the sidecar (and the client side implementations) can overlay the standard spec to give a more custom / flexible experience. Where would the best place to engage on that topic? Here or the github EIP?

Sounds good! I'll update the EIP with a discussions-to URL so we can discuss there.

Scott Street
@sprusr
@Arachnid right, thanks for the clarification. Although my real issue was that blockNumber only accepts a hex string. Why not accept numbers (or number string)? Is this intended?
Kris Shinn
@kshinn
@sprusr Awesome! I can't wait to see how it comes along. FYI, I was playing with the concept of directives to add meaning (as well has handles) to parsing the schema. I got inspiration from apollo-state-link that uses that technique for enriching gql queries with local storage values.
Scott Street
@sprusr
@kshinn nice, yeah I did have a look into directives also. In the end we decided it better to make it as if the contracts are just part of the schema, but perhaps it's worth a reconsider, especially if it can remove the need for generating/stitching schemas. Thanks for a mention in the ETHDenver write up too!
Nick Johnson
@Arachnid
@sprusr Blocknumber should accept an integer. Where are you seeing that it accepts only a hex string?
Scott Street
@sprusr

@Arachnid I could be mistaken, but I believe the following query received an error back from the geth about an incorrect type:

block(number: 0) {
    hash
}

And changing the value to "0x0" solved it. I've not tried since the weekend though, so I'll take another look this evening.

Okay no I tried just now and I can't reproduce, so I'm not sure what was up there. As you were...
Nick Johnson
@Arachnid
Cool :)
And it now has a number, 1767
Raúl Kripalani
@raulk
@Arachnid even though I ended up lacking bandwidth to collaborate on the EIP, I kinda wished that EthQL was cited as prior art. After all the project already had considerable traction in the community, and our schemas are 90% identical ;-)
Nick Johnson
@Arachnid
@raulk Good call, I'm sorry I didn't mention it. I'll add a citation.
@raulk Should I include you, or someone else, as co-author on the EIP? How should I cite EthQL's contribution?
E.G. Galano
@egalano
Independently from citing Raul on the EIP please also include Kris Shinn as the Infura rep.
Nick Johnson
@Arachnid
Did he work on the schema too?
Raúl Kripalani
@raulk

@Arachnid cool! I’m happy to appear as a co-author and backer for this EIP :-) I didn’t get a chance to help draft the initial version, but I can certainly stay engaged from now on. And I also authored the EthQL schema :-)

For citing EthQL, an appropriate way could be to add a Prior Art paragraph between the Motivation and Specification sections.

Kris is taking on the implementation and steering work from me. My bandwidth for EthQL is severely reduced as I take on more responsibilities in libp2p. I’m convinced he’ll do a great job!

Nick Johnson
@Arachnid
Noted, thankns.
What's Kris's github account name?
Raúl Kripalani
@raulk
kshinn
Thanks, @Arachnid!
Nick Johnson
@Arachnid
Thanks for the reminder.
Scott Street
@sprusr

Hey! I just published the first version of ethpollo, an apollo-client "link" wrapper for EthQL/EIP 1767 :)

So far it works for contract call queries only, but events coming soon. Going to need to adjust for changes in the EIP once they're implemented too. And in actual fact it doesn't work with EthQL until call is implemented there. Also there's almost certainly a ton of bugs!

https://www.npmjs.com/package/ethpollo

(P.S. we got a chicken 🐔)

E.G. Galano
@egalano
Awesome work!
I’ll check it out today
Programming is fun
@lildata
is the ethql project still alive ?? there hasn't been any activity on the repo in the last 10 months & https://ethql-alpha.infura.io is dead :-/