“Less is more”, that is why providing simplicity in our product is part of our goals. With our latest change we are making it simple to write GraphQL queries and mutations on Custom Resolvers.
How are we doing this?. You no longer need to learn a new concept to write GraphQL queries and mutations and instead you can now write plain/vanilla GraphQL.
CLI
Since we removed the external dependency with the GenQL CLI, the gen:types
command is no longer required and was replaced with the new pull:schema
command. Make sure you consider this and update any automation you may have.
Update CLI version:
1 2 3
yarn global add @composabase/cli or npm install -g @composabase/cli
Remove previously generated code
1
rm -f src/graphql/generated
Execute new command to pull schema
1
composabase pull:schema
Custom Resolvers
Remove GenQL devDependency
1
"@genql/cli": "^6.1.0",
Update SDK devDependency:
1
"@composabase/sdk": "^0.5",
- Add new devDependencies
GraphQL client
1
"@urql/core": "^4.2.3",
Support for node 20.x
1
"tsx": "^4.7.1",
Update the start script. Make sure your start looks like this:
1
"start": "tsx -r tsconfig-paths/register src/index.ts"
- Update custom resolvers converting any GenQL Code to vanilla GraphQL see examples below:
Selectionset
- Query
Need help
If you have Custom Revolvers and have questions about this update do not hesitate contacting us.