When upgrating to a new major version, here will be the steps required to upgrade.
We changed the overall way how you select things. We didn't like the builder-like structure since it brings overhead and is not very readable for larger queries.
We now have an object structure, fully typed (and thus autocompletable by good IDE's) and looks more like your typical graphql query.
//v0.7
Query.users().returnFields(r => r.select("id").select("name"));
//v1
Query.users().select({
id: {},
name: {}
});
//v0.7
Query.users().returnFields(r => r.all());
//v1
Query.users().select({
_all: {}
});
Here you can see how much cleaner it became.
//v0.7
Query.users().returnFields(r => r.with("posts", r => r.all().with("comments", r => r.all())));
//v1
Query.users().select({
posts: {
_all: {},
comments: {
_all: {}
}
}
});