Back

Bison Release 1.11.0

Kishan GajeraMonday, November 8, 2021
Echobind Bison app logo with version 1.11.0 text underneath.

We’re excited to ship another version of Bison that not only improves the web apps we build for our clients, but also the developer experience of working on Bison apps and contributing to the Bison template itself.

Not familiar with Bison? It’s Echobind’s starter repository for full-stack Next.js web apps. Check out the links below for more background on Bison and how to use it:

Nexus and Prisma

The previous version of Bison used the nexus prisma plugin developed by Nexus which allowed us to easily project fields from our prisma schema into the GraphQL API. However, that plugin will be deprecated in favor of one being currently developed by the Prisma team.

The new plugin will use generation to create the GraphQL API similar to how the Prisma Client is generated. The plugin is currently in early preview and we will look to introduce this into Bison when it’s production-ready.

In preparation for this, we’ve taken the steps to remove the nexus prisma plugin and just use plain Nexus. We’ve added documentation showing examples of how to define just about every type of field and relationship!

Code Generation

Bison relies heavily on code generation for the GraphQL API on both the front-end and back-end. To improve developer experience, we have removed all generated files from the repository and added them to the .gitignore so they do not cause unnecessary merge conflicts.

These changes do not affect the development process. When running the development server, yarn dev, all generated files will be created and re-generated on file changes. You can also run yarn build:types to generate these files at any time.

Upgrade to Next.js 11

After attending Next.js conf, our team was very excited about all the new features that were announced and the impact they would have for our developers and clients. Across the board, there are noticeable performance improvements that we are happy to bring into Bison. See their release blog post for more details.

Upgrade to Jest 27

In upgrading to Jest 27, it was announced that they’ve changed the default environment in which tests run. The unit tests in Bison test both client and server side code, so our tests will need access to both browser and node APIs. We’ve taken the recommend approach to default to the faster node environment and for tests that rely on the browser, configuring that test file specifically to run in the jsdom environment by adding the following docblock to the top of the file:

/** * @jest-environment jsdom */

Node 16

With Node 16 set to be the active LTS version starting October 26th, we’ve officially updated the CI and dev environment configuration to use version 16. See their release blog post for all the new features and changes.

TypeScript

We’ve upgraded Bison to use the latest version of TypeScript, 4.4.3. In addition to that, we’ve also enabled the noImplicitAny compiler option and refactored the codebase to be strongly typed. This will help to enforce best practices to ensure all variables are typed which results in a more maintainable codebase.

Contributing to the Bison Template

We have a lot of improvements planned for Bison so we’ve made it much easier to contribute changes to the Bison template. Check out the new contributing guide for more information on how you can help out. Whether it’s reporting bugs, creating pull requests, or participating in discussions, all contributions are welcome!

Share this post

twitterfacebooklinkedin

Related Posts:

Interested in working with us?

Give us some details about your project, and our team will be in touch with how we can help.

Get in Touch