Doc to help updating downstream applications. Breaking changes and packages updates are listed here.
Please open an issue or a pull request if you feel this doc is incomplete.
- See migration article from Vulcan Blog
serverTimezoneOffset
object is no longer injected in the head during SSR. Useimport { InjectData} from 'meteor/vulcan:lib; ...; await InjectData.getData("utcOffset");
instead. The value is the reverse fromgetTimezoneOffset
, see Moment doc
- Update to v4
meteor npm i --save-exact @material-ui/[email protected]
import MuiThemeProvider from @material-ui/core/styles/MuiThemeProvider"
becomesimport { MuiThemeProvider } from "@material-ui/core/styles"
- More broadly follow https://material-ui.com/guides/migration-v3/ to update Material UI to v4
- Follow the composition doc to handle
forwardRef
warnings: https://material-ui.com/guides/composition/#caveat-with-refs
npm install apollo-utilities
(to run tests)- Replace
Users.getViewableFields
byUsers.getReadableProjection
- Update React to a version over 16.8 (and under 17 which will bring breaking changes) to access hooks
- Update React Apollo and Apollo Client to access GraphQL hooks:
npm i --save-exact [email protected]; npm i --save [email protected]
compose
is not exported byreact-apollo
, userecompose
instead.- More broadly see
react-apollo
changelog for breaking changes editMutation
,newMutation
etc. are deprecated, use the newupdateFoo
,createFoo
syntax. An error message is thrown where deprecated mutations are used to help debugging- When using Vulcan data oriented hooks (
useMulti
,useCreate
...), use the newqueryOptions
andmutationOptions
option to pass options to the underlyinguseQuery
anduseMutation
hooks. Example call:useMulti({collection: Foos, queryOptions: { errorPolicy: "all" } })
. - No need to call
registerComponent
anymore to use Vulcan HOC. You can call them directly even if the underlying fragment is not yet registered. - Watched Mutations has been removed because it didn't work anymore, in favour to better Apollo's
update
option for mutations.