New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: add Gen2 specific doc for using SSR adapter with Nuxt 3 #7575
Conversation
src/pages/[platform]/build-a-backend/server-side-rendering/nuxt/index.mdx
Outdated
Show resolved
Hide resolved
src/pages/[platform]/build-a-backend/server-side-rendering/nuxt/index.mdx
Outdated
Show resolved
Hide resolved
src/pages/[platform]/build-a-backend/server-side-rendering/nuxt/index.mdx
Outdated
Show resolved
Hide resolved
src/pages/[platform]/build-a-backend/server-side-rendering/nuxt/index.mdx
Outdated
Show resolved
Hide resolved
src/pages/[platform]/build-a-backend/server-side-rendering/nuxt/index.mdx
Outdated
Show resolved
Hide resolved
src/pages/[platform]/build-a-backend/server-side-rendering/nuxt/index.mdx
Outdated
Show resolved
Hide resolved
src/pages/[platform]/build-a-backend/server-side-rendering/nuxt/index.mdx
Outdated
Show resolved
Hide resolved
src/pages/[platform]/build-a-backend/server-side-rendering/nuxt/index.mdx
Outdated
Show resolved
Hide resolved
src/pages/[platform]/build-a-backend/server-side-rendering/nuxt/index.mdx
Outdated
Show resolved
Hide resolved
src/pages/[platform]/build-a-backend/server-side-rendering/nuxt/index.mdx
Outdated
Show resolved
Hide resolved
src/pages/[platform]/build-a-backend/server-side-rendering/nuxt/index.mdx
Outdated
Show resolved
Hide resolved
// Extra the model operation function types for creating wrapper function later | ||
type RemoveFirstParam<Params extends any[]> = Params extends [infer _, ...infer Rest] ? Rest : never; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can this be removed now in favor of Schema["SomeModel"]["type"]
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The model operation APIs have a second parameter as well as options
, Schema["SomeModel"]["type"]
is insufficient for this use case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/pages/[platform]/build-a-backend/server-side-rendering/nuxt/index.mdx
Outdated
Show resolved
Hide resolved
src/pages/[platform]/build-a-backend/server-side-rendering/nuxt/index.mdx
Outdated
Show resolved
Hide resolved
src/pages/[platform]/build-a-backend/server-side-rendering/nuxt/index.mdx
Outdated
Show resolved
Hide resolved
src/pages/[platform]/build-a-backend/server-side-rendering/nuxt/index.mdx
Outdated
Show resolved
Hide resolved
src/pages/[platform]/build-a-backend/server-side-rendering/nuxt/index.mdx
Outdated
Show resolved
Hide resolved
} from 'aws-amplify/adapter-core'; | ||
import { parseAmplifyConfig } from 'aws-amplify/utils'; | ||
|
||
import type { LibraryOptions } from '@aws-amplify/core'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same nit for grouping type imports at the top of the file. Additionally, does this break when using npm's install-strategy=linked
, yarn, or pnpm? pnpm will not resolve imports from transient deps
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested with install-strategy=linked
Nuxt itself started failing while running postinstall
script. Consider the following statement printed by npm
npm WARN reify The "linked" install strategy is EXPERIMENTAL and may contain bugs.
I think we can use this import path as is for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
Example implementation: | ||
|
||
```ts title="middleware/amplifyAuthMiddleware.ts" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does Nuxt/Vue have a pattern for filenames? filenames earlier in the doc are kebab-case where this is camelCase
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so, the snake cases above followed Nuxt documentations, tested using camel case doesn't break them. I can update and unify.
Files for renderings a actual route, have names in snake case following url formatting convention, e.g. /storage-list
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…t/index.mdx Co-authored-by: ashika112 <155593080+ashika112@users.noreply.github.com>
Co-authored-by: josef <josef.aidt@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Left some nit suggested changes on wording etc. but feel free to ignore them. Just stuff that jumped out at me.
src/pages/[platform]/build-a-backend/server-side-rendering/nuxt/index.mdx
Outdated
Show resolved
Hide resolved
src/pages/[platform]/build-a-backend/server-side-rendering/nuxt/index.mdx
Outdated
Show resolved
Hide resolved
src/pages/[platform]/build-a-backend/server-side-rendering/nuxt/index.mdx
Outdated
Show resolved
Hide resolved
src/pages/[platform]/build-a-backend/server-side-rendering/nuxt/index.mdx
Outdated
Show resolved
Hide resolved
src/pages/[platform]/build-a-backend/server-side-rendering/nuxt/index.mdx
Outdated
Show resolved
Hide resolved
src/pages/[platform]/build-a-backend/server-side-rendering/nuxt/index.mdx
Outdated
Show resolved
Hide resolved
// Extra the model operation function types for creating wrapper function later | ||
type RemoveFirstParam<Params extends any[]> = Params extends [infer _, ...infer Rest] ? Rest : never; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/pages/[platform]/build-a-backend/server-side-rendering/nuxt/index.mdx
Outdated
Show resolved
Hide resolved
src/pages/[platform]/build-a-backend/server-side-rendering/nuxt/index.mdx
Outdated
Show resolved
Hide resolved
Co-authored-by: Ivan Artemiev <29709626+iartemiev@users.noreply.github.com>
Description of changes:
Ported the Nuxt 3 doc from the Gen1 section with:
amplifyconfiguration.json
withamplify_outputs.json
path
parameters instead ofaccessLevel
Related GitHub issue #, if available:
Instructions
If this PR should not be merged upon approval for any reason, please submit as a DRAFT
Which product(s) are affected by this PR (if applicable)?
Which platform(s) are affected by this PR (if applicable)?
Please add the product(s)/platform(s) affected to the PR title
Checks
Does this PR conform to the styleguide?
Does this PR include filetypes other than markdown or images? Please add or update unit tests accordingly.
Are any files being deleted with this PR? If so, have the needed redirects been created?
Are all links in MDX files using the MDX link syntax rather than HTML link syntax?
ref: MDX:
[link](https://docs.amplify.aws/)
HTML:
<a href="https://docs.amplify.aws/">link</a>
When this PR is ready to merge, please check the box below
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.