diff --git a/docusaurus/docs/adding-typescript.md b/docusaurus/docs/adding-typescript.md index 25380216431..53f62bd9e92 100644 --- a/docusaurus/docs/adding-typescript.md +++ b/docusaurus/docs/adding-typescript.md @@ -16,6 +16,7 @@ npx create-react-app my-app --typescript yarn create react-app my-app --typescript ``` +> Note that having `create-react-app` installed globally can cause conflicts when using `--typescript`. If you've previously installed `create-react-app` globally via `npm install -g create-react-app`, we recommend you uninstall the package using `npm uninstall -g create-react-app` to ensure that `npx` always uses the latest version. To add [TypeScript](https://www.typescriptlang.org/) to a Create React App project, first install it: diff --git a/docusaurus/docs/loading-graphql-files.md b/docusaurus/docs/loading-graphql-files.md index 423cbff3d3e..1d50dcc9875 100644 --- a/docusaurus/docs/loading-graphql-files.md +++ b/docusaurus/docs/loading-graphql-files.md @@ -4,16 +4,16 @@ title: Loading .graphql Files sidebar_label: Loading .graphql Files --- -To load `.gql` and `.graphql` files, first install the [`graphql.macro`](https://www.npmjs.com/package/graphql.macro) package by running: +To load `.gql` and `.graphql` files, first install the [`graphql`](https://www.npmjs.com/package/graphql) and [`graphql.macro`](https://www.npmjs.com/package/graphql.macro) packages by running: ```sh -npm install --save graphql.macro +npm install --save graphql graphql.macro ``` Alternatively you may use `yarn`: ```sh -yarn add graphql.macro +yarn add graphql graphql.macro ``` Then, whenever you want to load `.gql` or `.graphql` files, import the `loader` from the macro package: @@ -27,13 +27,11 @@ const query = loader('./foo.graphql'); And your results get automatically inlined! This means that if the file above, `foo.graphql`, contains the following: ```graphql -gql` - query { - hello { - world - } +query { + hello { + world } -`; +} ``` The previous example turns into: