@smartive/graphql-magic 15.0.1 → 15.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22,3 +22,25 @@ jobs:
22
22
  env:
23
23
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24
24
  NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
25
+ docs:
26
+ runs-on: ubuntu-latest
27
+ steps:
28
+ - uses: actions/checkout@v2
29
+ with:
30
+ persist-credentials: false
31
+
32
+ - name: Setup Node
33
+ uses: actions/setup-node@v3
34
+ with:
35
+ node-version: '20'
36
+ - name: Install and Build
37
+ run: |
38
+ cd docs
39
+ npm install
40
+ npm run build
41
+ - name: Deploy
42
+ uses: JamesIves/github-pages-deploy-action@v4
43
+ with:
44
+ branch: gh-pages
45
+ folder: docs/build
46
+ token: ${{ secrets.GITHUB_TOKEN }}
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
- ## [15.0.1](https://github.com/smartive/graphql-magic/compare/v15.0.0...v15.0.1) (2024-04-03)
1
+ ## [15.1.1](https://github.com/smartive/graphql-magic/compare/v15.1.0...v15.1.1) (2024-04-03)
2
2
 
3
3
 
4
4
  ### Bug Fixes
5
5
 
6
- * Stuff ([#152](https://github.com/smartive/graphql-magic/issues/152)) ([be06252](https://github.com/smartive/graphql-magic/commit/be0625222485da5ddb22b0d9feaf3ac7fdccd1a6))
6
+ * Docusaurus config ([415736b](https://github.com/smartive/graphql-magic/commit/415736b866c8526b24770a8e374cf0b3667380f6))
@@ -345,8 +345,9 @@ export const GET_POSTS = gql`
345
345
  ```
346
346
  {me && <CreatePost/> }
347
347
  <Posts/>
348
- ```
348
+ ```
349
349
 
350
+ ```
350
351
  async function CreatePost() {
351
352
  async function createPost(formData: FormData) {
352
353
  'use server'
@@ -377,7 +378,9 @@ async function CreatePost() {
377
378
  </div>
378
379
  </form>
379
380
  }
381
+ ```
380
382
 
383
+ ```
381
384
  async function Posts() {
382
385
  const { data: { posts } } = await executeGraphql<GetPostsQuery>({ query: GET_POSTS })
383
386
 
@@ -397,7 +400,9 @@ async function Posts() {
397
400
  </div>)}
398
401
  </div>
399
402
  }
403
+ ```
400
404
 
405
+ ```
401
406
  function CreateComment({ postId }: { postId: string }) {
402
407
  async function createComment(formData: FormData) {
403
408
  'use server'
@@ -423,3 +428,4 @@ function CreateComment({ postId }: { postId: string }) {
423
428
  </div>
424
429
  </form>
425
430
  }
431
+ ```
@@ -7,11 +7,8 @@ const config: Config = {
7
7
  tagline: 'Model-first GraphQL API generator',
8
8
  favicon: 'img/favicon.ico',
9
9
 
10
- // Set the production url of your site here
11
- url: 'https://your-docusaurus-site.example.com',
12
- // Set the /<baseUrl>/ pathname under which your site is served
13
- // For GitHub pages deployment, it is often '/<projectName>/'
14
- baseUrl: '/',
10
+ url: 'https://smartive.github.io',
11
+ baseUrl: '/graphql-magic/',
15
12
 
16
13
  // GitHub pages deployment config.
17
14
  // If you aren't using GitHub pages, you don't need these.
@@ -71,7 +68,7 @@ const config: Config = {
71
68
  items: [
72
69
  {
73
70
  label: 'Docs',
74
- to: '/docs/intro',
71
+ to: '/docs/tutorial',
75
72
  },
76
73
  ],
77
74
  },
@@ -0,0 +1,70 @@
1
+ import clsx from 'clsx';
2
+ import Heading from '@theme/Heading';
3
+ import styles from './styles.module.css';
4
+
5
+ type FeatureItem = {
6
+ title: string;
7
+ Svg: React.ComponentType<React.ComponentProps<'svg'>>;
8
+ description: JSX.Element;
9
+ };
10
+
11
+ const FeatureList: FeatureItem[] = [
12
+ {
13
+ title: 'Easy to Use',
14
+ Svg: require('@site/static/img/undraw_docusaurus_mountain.svg').default,
15
+ description: (
16
+ <>
17
+ Docusaurus was designed from the ground up to be easily installed and
18
+ used to get your website up and running quickly.
19
+ </>
20
+ ),
21
+ },
22
+ {
23
+ title: 'Focus on What Matters',
24
+ Svg: require('@site/static/img/undraw_docusaurus_tree.svg').default,
25
+ description: (
26
+ <>
27
+ Docusaurus lets you focus on your docs, and we&apos;ll do the chores. Go
28
+ ahead and move your docs into the <code>docs</code> directory.
29
+ </>
30
+ ),
31
+ },
32
+ {
33
+ title: 'Powered by React',
34
+ Svg: require('@site/static/img/undraw_docusaurus_react.svg').default,
35
+ description: (
36
+ <>
37
+ Extend or customize your website layout by reusing React. Docusaurus can
38
+ be extended while reusing the same header and footer.
39
+ </>
40
+ ),
41
+ },
42
+ ];
43
+
44
+ function Feature({title, Svg, description}: FeatureItem) {
45
+ return (
46
+ <div className={clsx('col col--4')}>
47
+ <div className="text--center">
48
+ <Svg className={styles.featureSvg} role="img" />
49
+ </div>
50
+ <div className="text--center padding-horiz--md">
51
+ <Heading as="h3">{title}</Heading>
52
+ <p>{description}</p>
53
+ </div>
54
+ </div>
55
+ );
56
+ }
57
+
58
+ export default function HomepageFeatures(): JSX.Element {
59
+ return (
60
+ <section className={styles.features}>
61
+ <div className="container">
62
+ <div className="row">
63
+ {FeatureList.map((props, idx) => (
64
+ <Feature key={idx} {...props} />
65
+ ))}
66
+ </div>
67
+ </div>
68
+ </section>
69
+ );
70
+ }
@@ -0,0 +1,11 @@
1
+ .features {
2
+ display: flex;
3
+ align-items: center;
4
+ padding: 2rem 0;
5
+ width: 100%;
6
+ }
7
+
8
+ .featureSvg {
9
+ height: 200px;
10
+ width: 200px;
11
+ }
@@ -17,7 +17,7 @@ function HomepageHeader() {
17
17
  </Heading>
18
18
  <p className="hero__subtitle">{siteConfig.tagline}</p>
19
19
  <div className={styles.buttons}>
20
- <Link className="button button--secondary button--lg" to="/docs/intro">
20
+ <Link className="button button--secondary button--lg" to="/docs/tutorial">
21
21
  To the docs
22
22
  </Link>
23
23
  </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartive/graphql-magic",
3
- "version": "15.0.1",
3
+ "version": "15.1.1",
4
4
  "description": "",
5
5
  "source": "src/index.ts",
6
6
  "type": "module",
@@ -1,7 +0,0 @@
1
- ---
2
- title: Markdown page example
3
- ---
4
-
5
- # Markdown page example
6
-
7
- You don't need React to write simple standalone pages.