Skip to content

Commit

Permalink
Ensure code languages match their filename
Browse files Browse the repository at this point in the history
  • Loading branch information
jerelmiller committed Nov 21, 2024
1 parent 4506df8 commit 3b6e5e0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/source/data/fragments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,11 @@ function ToDoList() {
Fragments do not all need to be defined up-front when the cache is created. Instead, you can register named fragments lazily with the fragment registery. This is especially useful when combined with [colocated fragments](#colocating-fragments) whose fragment definitions are defined in component files. Let's look at an example:
```tsx title="fragmentRegistry.js"
```js title="fragmentRegistry.js"
export const { fragmentRegistry } = createFragmentRegistry();
```
```tsx title="index.js"
```js title="index.js"
import { fragmentRegistry } from "./fragmentRegistry";

const client = new ApolloClient({
Expand All @@ -215,7 +215,7 @@ const client = new ApolloClient({
We create a separate file that creates and exports our fragment registry. This gives us a way to access our shared fragment registry across our application. We use this shared fragment registry with our `InMemoryCache` instance.
```tsx title="TodoItem.js"
```jsx title="TodoItem.jsx"
import { gql } from "@apollo/client";
import { fragmentRegistry } from "./fragmentRegistry";

Expand Down Expand Up @@ -338,7 +338,7 @@ Use the `possibleTypes` option to the `InMemoryCache` constructor to specify sup
Here's an example `possibleTypes` declaration:
```ts
```js
const cache = new InMemoryCache({
possibleTypes: {
Character: ["Jedi", "Droid"],
Expand Down

0 comments on commit 3b6e5e0

Please sign in to comment.