WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Releases: redwoodjs/graphql

v0.23.0

13 Jan 20:23

Choose a tag to compare

Redwood is kicking off 2021 with back-to-back releases. 🚀 This version also adds the final piece of code for the launch of the Redwood Tutorial Pt 2 — stay tuned!

Come join us for a RedwoodJS Meetup on Thursday, January 14! 👉 See this Forum post for details and free registration.

v0.23.0 Highlights

1. Redwood Console

Launch your very own interactive Redwood shell with yarn rw console

  • This feature is experimental and limited to DB. Docs here.

2. Fix for Redwood v0.22 web/ hoisted node_modules issue

Redwood v0.22 experienced a strange issue with node_modules being hoisted to the web/ directory. If you are upgrading from a v0.22 project and/or are having an issue with 'node_modulesbeing hoisted to yourweb/` directory, see the "Manual Code Modifications" section below for the fix.

Changed

Added

Fixes

  • Tests: move whatwg-fetch from devDep to dep #1625 by @Tobbe
  • Template: fix issue with web/ dependencies being hoisted to ./web 11780ed by @peterp

Breaking ⚠️

Nothing to see here 🎉


How to upgrade RedwoodJS to the latest v0.23

👉 IMPORTANT: Skipping versions when upgrading is not recommended and will likely cause problems. Do read through all Release Notes between your current version and this latest version. Each minor release will likely require you to implement breaking change fixes and apply manual code modifications.

Manual Code Modifications

1. Add Test DB Env Var

Projects running a database other than SQLite will need to include an env var to config a local DB for testing. Admittedly, this has not (yet) been well documented.

  • Add the env var TEST_DATABASE_URL to your projects .env
  • See this commit, which adds an example to the installation template's .env.defaults.

2. Downgrade "react" and "react-dom" packages in web/package.json (if applicable)

In the Redwood v0.22 release, both "react" and "react-dom" packages were upgraded to v17. However, this created a weird/strange/unexpected issue where packages were being hoisted from root to the web/ directory, resulting in seemingly random errors with Jest test failures and React hook errors.

  • The fix --> downgrade both "react" and "react-dom" in web/package.json to 16.13.1
  • See this commit for a reference

Upgrade Packages

Run the following command within your App directory:

yarn rw upgrade

Need help or having trouble upgrading? See this forum topic for manual upgrade instructions and general upgrade help.

v0.22.1

07 Jan 19:02

Choose a tag to compare

Happy New Year 🥳 And what an exciting year it's going to be for Redwood. Things are kicking off with a 🚀

👉 Join us for the upcoming RedwoodJS Meetup on Thursday, January 14th. We're going to be talking about plans for the upcoming v1, all the shiny new things in this release, and have a demo of a new production Redwood app.

👉 Help us improve the upcoming Redwood Tutorial Pt 2. In preparation for the v1 release, we're again using Tutorial-Driving-Development to guide the way. We need your help trying it out before it's published.

And now on to the amazing work included in this release thanks to the amazing, collaborative community of people listed below.

v0.22 Highlights

Azure AD Authentication Provider

That's right, Azure AD is supported out of the box thanks to @jeliasson.
- Documentation
- PR #1311

New Test Scenarios

Testing with mock data just got a whole lot easier thanks to @cannikin The new Scenarios are data that is pre-set into the database at the start of your test and removed afterward.
- Read the full explanation and how to use in #1465
- And keep a lookout for the deep-dive in the upcoming Tutorial Pt 2

Bring your own GraphQL Client Library

Redwood ships with Appollo GraphQL Client, but we recognize that's not necessarily the right choice for every project. Thanks to @peterp, you can now swap out for the tool of your choice!

Changed

  • CLI: update diagnostics to display a success message when no errors or warnings are encountered #1405 by @M0nica
  • CLI: Update Setup TailwindCSS to v2 using PostCSS v7 compatible install #1540 by @jtoar
  • CLI: Tailwind setup use fs.renameSync instead of mv #1579 by @Tobbe
  • GraphQL: Allow users to "bring your own" GraphQL Library #1498 by @peterp 🎉
  • Forms: Improve typings for errors #1510 by @Tobbe
  • UI: Only stop rendering on Private routes #1519 by @peterp
  • Webpack: Make webpack load .mjs extensions #1528 by @peterp
  • Auth: upgrade to Supabase 1.0; [email protected] with cleaner imports #1536 #1564 by @Tobbe
    • this is a breaking change for projects currently using Supabase. See "Breaking Changes" section below.
  • MSW: Explicit target environment for MSW #1574 by @peterp
  • Docs: Contributors consolidate Core Team with Roles and update with new contributors #1541 by @thedavidprice
  • Docs: Clarify CONTRIBUTING.md #1580 by @jtoar
  • Prisma: Upgrade Prisma v2.12.1 #1604 by @thedavidprice
    • Release Notes for v2.12.0 and v2.12.1
    • Standalone Prisma Studio app for macOS
    • Prisma codemods help upgrading your codebase
    • Microsoft SQL Server now supports native database types (Preview)
    • BREAKING: Remove non-$ methods
    • BREAKING: 1-1-relations must now have an optional side
    • BREAKING: Fix how data for Json[] fields is stored
    • DEPRECATION: Rename findOne to findUnique
    • DEPRECATION: Move most types under the Prisma namespace

Added

Fixes

  • Lint: Orderliness and break avoiding lint rules, package.json flags #1381 by @Krisztiaan
  • Lint: Fix jest-dom lint errors #1575 by @peterp
  • Lint: Fixed a few eslint warnings #1582 by @Tobbe
  • Storybook: Fixes Storybook/Webpack Out of Memory Error by using relative path to config stories location #1509 by @dthyresson
  • Auth: Fix FetchConfigProvider to reprise handling no auth #1515 by @jtoar
  • Auth: Supabase getToken uses session to get access_token so that graphql calls are authenticated #1539 by @dthyresson
  • GraphQL: Fix renamed export QueryHooksProvider to GraphQLHooksProvider #1520 by @peterp
  • Router: Include queryParams in redirectTo #1526 by @dac09
  • Deploy: Fix aws_serverless config when api folder missing #1553 by @bennettrogers
  • Babel: Make glob import dir ignore .scenarios. files. #1607 by @peterp

Breaking ⚠️

For projects using Supabase Auth

  1. This release upgrades to Supabase v1, which requires a new env var SUPABASE_JWT_SECRET:

  2. Additionally, the Supabase token is now decoded whereas before it was returned undecided.

Prisma custom implementations

This version uses Prisma v2.12, which includes the following breaking changes affecting some projects with related custom implementation:

  • Remove non-$ methods
  • 1-1-relations must now have an optional side
  • Fix how data for Json[] fields is stored

If your project is affected, you'll need to review the Prisma v2.12 Release Notes.

Note: Prisma now includes a code mode command, which will help fix any issue. See the release notes for more info. General example:

cd my-app
npm install @prisma/cli @prisma/client
npx @prisma/codemods update-2.12 ./

How to upgrade RedwoodJS to the latest v0.22

👉 IMPORTANT: Skipping versions when upgrading is not recommended and will likely cause problems. Do read through all Release Notes between your current version and this latest version. Each minor release will likely require you to implement breaking change fixes and apply manual code modifications.

Upgrade Packages

Run the following command within your App directory:

yarn rw upgrade

To run the upgrade command, your project must be using v0.6.0 or greater. See this forum topic for manual upgrade instructions and general upgrade help.

v0.21.0

20 Nov 04:16

Choose a tag to compare

👉 Join us for the upcoming RedwoodJS Meetup on Thursday, December 3rd.

v0.21.0 Highlights

A huge Thank You to everyone who contributed to documentation on redwoodjs.com. 🤩

And 🚀 to @dac09 and @Tobbe for these release highlights as well as all the fantastic individuals below who made this release possible!

Experimental support for React fast-refresh!

React fast refresh is a development-time feature that improves the "Hot reloading" functionality. The biggest benefit is that your components maintain state when you save them and they're refreshed on the screen. Learn more here about this feature.

To add support for fast-refresh, edit your redwood.toml file and add the following:

[web]
  # ... others
  experimentalFastRefresh = true

Restart you development process and you should be good to go!

Added multiproviders to firebase auth!

Now, when you logIn() or signUp() with the firebase auth client, you can optionally specify the provider: google.com, facebook.com, github.com, twitter.com, microsoft.com or apple.com. The default is google.com.

Converted @redwoodjs/forms to TypeScript!

More progress toward the Redwood v1 TS support goals!

Changed

Added

  • Auth: added multiproviders to firebase auth! #1412 @dac09 🎉
  • TS: converted @redwoodjs/forms to TypeScript! #1431 @Tobbe 🎉
  • Dev: experimental support for React fast-refresh! #1461 #1463 #1464 @dac09 🎉
    • see "Highlights" above for instructions
  • Ops: GH Action to create packages from PRs #1459 #1485 #1477 @Tobbe
  • Storybook: add open flag, yarn rw storbook --open will now open the browsers. #1445 @jvanbaarsen
  • Storybook: add Redwood's "node" Webpack config to Storybook's Webpack config. #1491 @jderrough
  • Server: http server tweaks. #1441 @peterp
  • Prisma: added { redwood { prismaVersion } } field to GraphQL #1425 @jvanbaarsen
  • Prisma: add ability to specify a custom path for the prisma.schema #1424 @dhausser
  • CRWA: Quick start message added to yarn create redwood-app #1388 @kevPo

Fixes


Breaking ⚠️

[Minor Change] In this release, the Apollo fetchPolicy and nextFetchPolicy were changed for Redwood Cell's beforeQuery. It's possible that cache behavior may change for custom implementations of Apollo cache configuration. However, it's unlikely the majority of Redwood projects will experience any changes after upgrading — tests demonstrated backwards compatibility. (See #1428) Also relevant are updates to Scaffold Generators no longer requiring refetchQuery calls. Note: existing refetchQuery configuration is backwards compatible. (See #1497)


How to upgrade RedwoodJS to v0.21.0

👉 IMPORTANT: Skipping versions when upgrading is not recommended and will likely cause problems. Do read through all Release Notes between your current version and this latest version. Each minor release will likely require you to implement breaking change fixes and apply manual code modifications.

Manual Code Modifications

The following code modifications are recommended but not required.

  1. [Recommended] Rename api/prisma to api/db
    This change is not required. New installations of Redwood now use the directory api/db instead of api/prisma. If you change the directory name in your project, you must also add a schemaPath config to redwood.toml. See #116 for code change example.
// redwood.toml
...
[api]
  port = 8911
  schemaPath = "./api/db/schema.prisma"
...
  1. [Recommended] Remove schema.prisma "rhel-openssl-1.0.x" binaryTarget
    Prisma v2.11.0 (included in this release) fixes the requirement for adding "rhel-openssl-1.0.x". Removing this binaryTarget may also reduce the size of the built API. See #115 for code change example.
// api/db/schema.prisma
...
generator client {
  provider      = "prisma-client-js"
  binaryTargets = "native"
}
...

Upgrade Packages

Run the following command within your App directory:

yarn rw upgrade

To run the upgrade command, your project must be using v0.6.0 or greater. See this forum topic for manual upgrade instructions and general upgrade help.

v0.20.0

23 Oct 04:07

Choose a tag to compare

This is definitely a mega release! 📣 Just scroll through all the work below, contributed by so many individuals. Hats off to the active, growing Redwood community! Version v0.20.0 is amazing because of you. 🚀

⚠️ This version contains breaking changes and manual code modifications. See the "Breaking" and "Manual Code Modifications" sections below for more info and upgrade instructions.

v0.20.0 Highlights

If this version has a theme, it's performance. Most of the highlights below are under-the-hood improvements and hard-earned fixes.

  • Improved Router Performance #1284
  • Improved GraphQL Cache Handling (Apollo) #1250 #1387 #1342
  • Improved TypeScript Support for Web #1232 #1241 #1247 #1291
  • Added Setup Command for one-step install and config and install #1154 #1234 #1269 #1282 #1294
    • after upgrading, run yarn redwood setup --help to see current commands
  • Fixed Jest Test Command #1376
  • Fixed Storybook Command on Windows #1324

Additionally, a huge Thank You to everyone who contributed to documentation on redwoodjs.com. 🤩

Changed

Added

Fixed


Breaking ⚠️

Appollo Client v3 Cache Behavior for GraphQL Mutations

Prior to this version, Redwood Cells used Apollo's cache and network fetch policy. This has been removed in favor of the default policy (see #1250). This change, along with the new Apollo v3 behavior, changes the behavior of mutations — state changes will often not render without a page reload.

From the ApolloDocs: If a mutation modifies multiple entities, or if it creates or deletes entities, the Apollo Client cache is not automatically updated to reflect the result of the mutation.

tl;dr: if things with your App's CRUD rendering seem broken after upgrading, you'll need to update the Mutations in your components to use Apollo's new features like refetchQueries:

Prisma Query Engine Deploy Error

Prisma v2.9.0 now requires setting an additional binaryTarget in schema.prisma. Otherwise, the Prisma query engine will not build correctly, resulting in an error affecting the production deploy.

  • See the "Manual Code Modifications" section below for required changes

How to upgrade RedwoodJS to v0.20.0

👉 IMPORTANT: Skipping versions when upgrading is not recommended and will likely cause problems. Do read through all Release Notes between your current version and this latest version. Each minor release will likely require you to implement breaking change fixes and apply manual code modifications.

Manual Code Modifications

  1. Prisma v2.9 requires an additional binaryTarget for production deploys to build correctly:
    • add the additional binaryTarget "rhel-openssl-1.0.x" to api/prisma/schema.prisma
    • see this example
  2. VS Code GraphQL extension required config:
  3. Update Scaffold generated Component files (or, in some cases, your own custom mutation implementations)
    • Redwood Scaffold generated CRUD needs to be updated in order to work with the new Apollo v3 Cache. There are four generated component files that need to be updated for each generated Scaffold. The specific names will be different based on your schema models. For the Tutorial post model as an example, the files to update are the components /Post/Post.js, /Posts/Posts.js, /NewPost/NewPost.js, and /EditPostCell/EditPostCell.js
    • Note: One way to handle this is to re-run Scaffold Generator with the --force option. 🚨 It's the fastest. But this will overwrite any customization.
    • Edit [Model].js, [Model]s.js, and New[Model].js Components (e.g. Post.js, Posts.js, and NewPost.js):
      • See the three files in this commit for reference. Note: the reference file are Name.js.template, Names.js.template, and NewName.js.template
      • For each file, add import { QUERY } from 'src/components/${pluralPascalName}Cell'
      • For the respective DELETE and CREATE mutation's onCompleted property, add refetchQueries: [{ query: QUERY }], awaitRefetchQueries: true,
      • For the [Model]s.js file, remove the current refetchQueries property from the onDeleteClick conditional
    • Edit the Edit[Model]Cell.js Component (e.g. EditPostCell.js):
      • See theEditNameCell.js.template file in this commit for reference
      • The UPDATE mutation requires passing all properties, not just id in the same manner as the QUERY
      • Add all QUERY properties (e.g. id, title, body, createdAt) to the UPDATE_[Model]_MUTATION

Upgrading is worth it! And, more importantly, there's a vibrant community for help (and encouragement) if you need it.

  • Have questions or need help upgrading? Check out this Forum Topic.
  • We're evaluating how to handle the Redwood Client GraphQL. Check out this Forum Topic to learn more and share your experience and suggestions.

Upgrade Packages

Run the following command within your App directory:

yarn rw upgrade

*To run the upgrade command, your project must be using v0.6.0 or greater. [See this forum topic for manual upgrade instructions and general upgrade help](https://community.redwoodjs.com/t/how-to-upgrade-redwoodjs-app-and-...

Read more

v0.19.3

10 Oct 01:33

Choose a tag to compare

Patch release fixing VS Code extension on Windows:

  • fixes several bugs related to path and file-uri handling in Windows #1318
  • also fixes a related issue where we were only looking for ".js" files (it should be "js, jsx, ts, tsx") #1318

v0.19.2

05 Oct 01:23

Choose a tag to compare

This is a patch release to get VS Code extension working:

  • Small Language Server fixes (to get VSCode extension working) #1267 by @aldonline
    • Suppress most error responses from the Language Server
    • Improve initialization order of LSP components
    • Tolerate certain missing files and folders

v0.19.1

21 Sep 16:06

Choose a tag to compare

This is a quick bug fixing release:

  • Export some additional Apollo methods: useClient, useSubscription and useLazyQuery. #1185 @KrisCoulson
  • Incorrect import of default merge versus named export merge. #1188 @jeliasson
  • Make yarn rw generate util tailwind use the correct pinned version of postcss-loader and autoprefixer. #1189 @dthyresson

v0.19.0

18 Sep 09:01

Choose a tag to compare

v0.19.0 Highlights

  • We've upgraded to Apollo Client v3!
  • We've dropped support for IE 11 and remove some things in the bundle that are no longer required. This gave us a ~80KB reduction in bundle size.

Changed

Added

Fixed

Breaking ⚠️

  • We've dropped support for IE 11, which might be a concern for some users, if you absolutely want to support IE 11 please reach out to @peterp and he'll write up some instructions.

  • We've upgraded Apollo Client to v3.1.4, if you modified the cache when a mutation ran then you might experience some issues, please check the migration notes for Apollo Client: https://www.apollographql.com/docs/react/migrating/apollo-client-3-migration/

How to upgrade RedwoodJS to v0.19.0

👉 IMPORTANT: Skipping versions when upgrading is not recommended and will likely cause problems. Do read through all Release Notes between your current version and this latest version. Each minor release will likely require you to implement breaking change fixes and apply manual code modifications.

Manual Code Modifications

  1. In the last few releases, we let you know that db should not be passed createGraphQLHandler. We've now removed that. You should instead disconnect from Prisma in onException in the file api/src/functions/graphql.js:
  2. Drop support for IE 11 by updating Browserslist targets in web/package.json:
  3. Improve VS Code debugging by adding .vscode/launch.json:

Upgrade Packages

Run the following command within your App directory:

yarn rw upgrade

To run the upgrade command, your project must be using v0.6.0 or greater. See this forum topic for manual upgrade instructions and general upgrade help.

v0.18.0

09 Sep 16:53

Choose a tag to compare

v0.18.0 Highlights

  • Supabase Authentication Provider 🔐
  • More Typescript and Conventions Support ⚡️
    • Custom Babel plugin mapping imports made against directories to files matching the directory name. Works across a project (both web/ and api/) #1102
    • Router type definitions #1110

Changed

  • Generators: quote paths and keywords with <tt> instead of quotation marks in JSX template generator #1094 by turadg

Added

  • TS: Create Directory Named Import plugin #1102 by peterp  🎉
  • TS: Add typedefs to router #1110 by peterp 🎉
  • Auth: Add supabase auth provider #1033 by amorriscode 🎉
  • Auth: Adds signup() to Auth to default UI to a signup tab/form when available #1057 by dthyresson

Fixed

Breaking ⚠️

nothing to see here 🙈


How to upgrade RedwoodJS to v0.18.0

👉 IMPORTANT: Skipping versions when upgrading is not recommended and will likely cause problems. Do read through all Release Notes between your current version and this latest version. Each minor release will likely require you to implement breaking change fixes and apply manual code modifications.

Upgrade Packages

Run the following command within your App directory:

yarn rw upgrade

To run the upgrade command, your project must be using v0.6.0 or greater. See this forum topic for manual upgrade instructions and general upgrade help.

v0.17.2 - Fix deploy generators

03 Sep 16:41

Choose a tag to compare