Skip to content

Commit 551c0c5

Browse files
committed
docs(readme): simplify example
1 parent 984cdc0 commit 551c0c5

File tree

1 file changed

+2
-26
lines changed

1 file changed

+2
-26
lines changed

README.md

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -21,42 +21,18 @@ FraQL brings component isolation and automocking into your application. You can
2121

2222
## Example
2323

24-
**Without FraQL**
25-
26-
```js
27-
import gql from 'graphql-tag'
28-
29-
const fragment = gql`
30-
fragment MyFragment on Article {
31-
title
32-
description
33-
}
34-
`
35-
36-
const query = gql`
37-
query Articles {
38-
articles {
39-
id
40-
...MyFragment
41-
}
42-
}
43-
44-
${fragment}
45-
`
46-
```
47-
48-
**With FraQL**
49-
5024
```js
5125
import gql from 'fraql'
5226

27+
// Create fragment without naming it
5328
const fragment = gql`
5429
fragment _ on Article {
5530
title
5631
description
5732
}
5833
`
5934

35+
// Just use it in your query!
6036
const query = gql`
6137
query Articles {
6238
articles {

0 commit comments

Comments
 (0)