You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.
Related to #859. The combination of the new GraphQL API and the big database upgrade has left our types in a pretty bad place. There is a lot of code in the repository related purely to describing types with subtle differences and how to convert between them. There are a few different steps that we could take to address the problem. We need to prioritize any potential changes that could affect backwards compatibility so that they get included in the v10 release instead of afterwards.
Use strings whenever possible instead of common.Address, common.Hash, and common.Bytes. Strings are easy to convert to JavaScript, JSON, GraphQL, and SQL, but the types from the common package need to be converted manually. This change alone would remove a lot of type conversion code.
Make the browser API, native Go API, and GraphQL API match more closely. Ideally the browser API and the TypeScript GraphQL client should have the same interface. This will help us accomplish some of the goals laid out in GraphQL API Draft Specification #854 and simplify the experience of using 0x Mesh.
Create a types package in the TypeScript monorepo (i.e. the packages/ directory) which contains all common types and conversion between them. @0x/mesh-browser, @0x/mesh-browser-lite, and @0x/mesh-graphql-client can all depend on this types package.
The text was updated successfully, but these errors were encountered:
Related to #859. The combination of the new GraphQL API and the big database upgrade has left our types in a pretty bad place. There is a lot of code in the repository related purely to describing types with subtle differences and how to convert between them. There are a few different steps that we could take to address the problem. We need to prioritize any potential changes that could affect backwards compatibility so that they get included in the v10 release instead of afterwards.
common.Address
,common.Hash
, andcommon.Bytes
. Strings are easy to convert to JavaScript, JSON, GraphQL, and SQL, but the types from thecommon
package need to be converted manually. This change alone would remove a lot of type conversion code.types
package in the TypeScript monorepo (i.e. the packages/ directory) which contains all common types and conversion between them.@0x/mesh-browser
,@0x/mesh-browser-lite
, and@0x/mesh-graphql-client
can all depend on thistypes
package.The text was updated successfully, but these errors were encountered: