Commit graph

1226 commits

Author SHA1 Message Date
38elements
aa5f918c30
Update Preact Example (#10380) 2020-02-01 23:56:34 -05:00
Justin Elias
9e6689e6db
added fix for #8893 (#10370) 2020-01-31 19:58:46 -05:00
Ivan Kleshnin
d04d976698
Improve api-routes-apollo-server-and-client-auth Example (#10358)
1. Prevent possible race conditions of cache pruning, refetching and redirects

2. Note: the original code has the following defect.

SignOut action restarts the dev server effectively resetting the memory and erasing all the "registered users" data. You have to SignUp again after SignOut. I'm not sure how
to properly fix it a.t.m
2020-01-31 10:27:21 -05:00
Ivan Kleshnin
74c2600b46
Fix api-routes-apollo-server-and-client-auth Example (#10334)
* Fix api-routes-apollo-server-and-client-auth Example

`client.resetStore()` must be called after SignIn, SignOut actions

Otherwise, even the current basic auth is not working 100% of the time...

For example, as caching occurs here:

```
const { data, loading } = useQuery(ViewerQuery)
```

it sometimes (race conditions!) prevents a user from signing in
the current code base.

Check https://github.com/apollographql/apollo-cache-persist/issues/34#issuecomment-371177206 comment for more info.

* Fix api-routes-apollo-server-and-client-auth Example (linting)
2020-01-30 14:33:42 +01:00
Zhe Zhang
3cd4d01d7c
Fixes #10333 with-next-seo sample issues (#10335) 2020-01-30 14:32:53 +01:00
Tim Neutkens
157a7a7b8c
Upgrade with-carbon-components to built-in SCSS (#10321)
Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-30 13:26:26 +01:00
Micah Alcorn
6f16cef3e2
Repair advanced feature reference (#10330)
* Repair advanced feature reference

The explanation of the custom document feature had been moved.

* Update README.md

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-29 19:51:58 -05:00
Abhishek Warokar
372031246d Fix typo in FaunaDB example (#10304)
Colleciton -> Collection
2020-01-28 16:30:16 +01:00
Robin Cussol
6f6989b8e4 Fix with-orbit-components's name in package.json (#10307)
This is to be more consistent with other examples.
2020-01-28 16:10:26 +01:00
Luis Alvarez D
57f72eac9e Add catch all routes example and a link to it in docs (#10202)
* Added example

* Updated readme of the dynamic-routing example

* Updated catch all docs

* Simplified example

* Update examples/catch-all-routes/README.md

Co-Authored-By: Joe Haddad <joe.haddad@zeit.co>

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-27 13:29:05 -05:00
Shu Uesugi
e1083f0e3a docs: remove --save from npm install; avoid system-ui (#10252)
* Minor edits for CSS doc

* Remove unnecessary --save from npm install

* Different font family

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-27 08:35:12 -05:00
Matthew Sweeney
b0053a4a73 Update FaunaDB Example Instructions (#10280)
* update fauna example instructions

* change key name in setup script
2020-01-27 12:52:04 +01:00
Soichi Takamura
f13bf1e2bf [example with-typescript-graphql] Fix type error (#10269)
* fix: Type error

* Improve README.md
2020-01-25 22:32:58 -05:00
Aaron Reisman
a356d2f68c Add Apollo Server and Client Auth Example (#9913)
* Add Apollo Server and Client Auth Example

* Some updates

* Updated docs

Co-authored-by: Luis Alvarez D. <luis@zeit.co>
2020-01-23 14:55:45 -05:00
Rohman Masyhar
320d98e051 Add example with-xstate (#10234)
Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-23 13:24:35 -05:00
Andrew Kim
e2de7a8e78 Update README.md for example project "form-handler" (#10224) 2020-01-23 10:10:46 +01:00
Shu Uesugi
dc0f2678f0 Remove unnecessary exportPathMap from examples (#10218)
Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-22 22:06:07 +01:00
fauna-brecht
7d419f885e Let users define their own database as easily as possible. (#10209)
* Let users define their own client token.

* Make sure users know that GraphQL schema can also be done via the UI

* Update README.md

* Update setup.js

Co-authored-by: Matthew Sweeney <mail@msweeneydev.com>
Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-22 15:16:56 -05:00
MH Rohman Masyhar
275a65555a Add with-stencil example (#10125)
* feat(example): add with-stencil

* feat(docs): add build stencil component

* fix: disable eslint config for h render

* Update README.md

* Delete .editorconfig

* Update index.js

* Fix linting

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-20 16:45:03 -05:00
Thibault
71e29cd80a Update Relay Modern example (#10150)
* chore(npm): update dependencies

* fix(relay): move GraphQL query outside pages folder

* refactor(react): destructure props

* refactor(react): remove unused key and simplify syntax
2020-01-20 16:31:45 -05:00
Aziz Khambati
b72b8e225d [with-emotion-10,11] Update emotion examples to v10 & v11 (#9646)
* Update emotion to v10, use @emotion/core, @emotion/styled

* Add with-emotion-11 and make review changes

* Fix package names and run prettier

* fix readmes

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-20 16:26:22 -05:00
Afzal Sayed
b95214e2cd feat(examples:tailwind): add postcss-preset-env (#10160)
* feat(examples:tailwind): add postcss-preset-env

* fix: prettier

* Review changes

* Update README.md

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-20 16:13:18 -05:00
Michael Stramel
ea0d916b50 example: Convert _app.js to functional components (#10115)
Fix formatting
2020-01-20 16:13:04 -05:00
Kevin Jennison
34f1aefa4a Add example: with-firebase-authentication-serverless (#10078)
* Start from existing example

* Upgrade some dependencies

* Use dotenv

* Remove custom server

* Add serverless Firebase auth

* Add TODOs

* Update project name

* Fix build script

* Remove server middleware from client JS bundle

* Add logout functionality

* Redirect to auth page on logout

* Remove TODO

* Add comments about the cookie-session approach

* Remove the sessions folder

* Add comments for eslint

* Remove unused files

* Clarify comment

* Update README.md

* Rename variable for clarity

* Update README.md

* Change some comments

* Add more to gitignore

* Remove the bundle analyzer

* Move server-side auth user logic from _app.js to a HOC to support static HTML rendering

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-20 16:12:48 -05:00
Shane Kunz
ec658fc998 sends Google Analytics correct url path on fresh page load (#10146) 2020-01-20 11:29:35 -05:00
Ev Haus
bbf19cd99e Minor update for the "with-react-ga" example (#10156) 2020-01-18 19:03:12 -05:00
Sang Song
9352392f4f chore(examples): Update firebase version (#10145) 2020-01-17 23:06:58 +01:00
Zhe Zhang
0b1217e79e Update with-tailwindcss example (#10141)
Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-17 16:02:38 -05:00
Oleg Filonchuk
aa6991f206 update readme.md (#10136)
fixed a little typo
2020-01-17 14:22:40 -05:00
Shu Uesugi
6804039e94 Make example READMEs more consistent (#10124)
* npx create → npm init

* Fix inconsistent instructions

* Update amp-first

* Update with-graphql-react

* with-firebase-cloud-messaging

* Update with-higher-order-component

* change create-next-app url

* Update create-next-app instruction

* Update instructions to use npm instead of npx

* Move "the idea behind the example" to top

* Rename

* Rename

* Update contributing.md with a README template
2020-01-16 23:23:56 +01:00
Lucio Villa
31597bbd18 added amp-img example with fallback attribute (#10122) 2020-01-16 10:09:13 +01:00
Victor Mota
d6721676ca Add an example for Fauna using cookie based auth (round 2) (#9986)
* Add an example for Fauna using cookie based auth.

* Update example to use more secure method of non-js cookie and all authed access via backend api calls.

* Updated README

* Updated files and added prettier

* Remove unused import to fix lint issue.

* Improve documentation on how to setup fauna. Remove client key to simplify setup.

* Remove semicolons

* Lint fix

* Updated readme instructions and deployment

* Fixed client side redirect issue with /profile

* Simplified login code

* Simplified signup code

* Removed isomorphic-unfetch

* Simplified logout

* Removed get-host file

* Removed the custom getInitialProps from withAuthSync

* Removed user email from localStorage

Co-authored-by: Luis Alvarez D. <luis@zeit.co>
2020-01-15 12:08:42 -05:00
Alejandro Garcia Anglada
c30e54283f Added with-styled-components-rtl example (#10074)
* Added with-styled-components-rtl example

* Add idea behing the example

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-14 13:18:31 -05:00
Shu Uesugi
0a67c7ee23 Update basic-export to use zero config support (#10079) 2020-01-14 10:25:56 +01:00
bokuweb
2cd8f1c920 Update server.js (#10056)
I think `httpOnly` property should set as `cookie`'s property.
This is because `SessionOptions` is following.

```
  interface SessionOptions {
    secret: string | string[];
    name?: string;
    store?: Store | MemoryStore;
    cookie?: {
      maxAge?: number;
      signed?: boolean;
      expires?: Date;
      httpOnly?: boolean;
      path?: string;
      domain?: string;
      secure?: boolean | 'auto';
      encode?: (val: string) => string;
      sameSite?: boolean | 'lax' | 'strict' | 'none';
    };
    genid?(req: express.Request): string;
    rolling?: boolean;
    resave?: boolean;
    proxy?: boolean;
    saveUninitialized?: boolean;
    unset?: string;
  }
```
2020-01-13 12:17:06 +01:00
David Baumgold
72a898a7be Correct spelling: withApollo (#10055) 2020-01-12 13:24:08 -05:00
Odi
b9af20fd5e Add with-chakra-ui example (#10033)
* add with-chakra-ui example

* lint

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-10 11:24:39 -05:00
Tim Neutkens
b5080f1010 Update css examples to use built-in CSS support (#10029)
* Update tailwind example

* Update blog-starter example

* Update with-next-css example

* Update with-quill-js

* Update with-rbx-bulma-pro

* Remove incompatible example

* Update with-react-multi-carousel

* Update-with-semantic-ui

* Update with-videojs example

* Remove @zeit/next-css from package.json of updated examples

* Remove deprecated examples

* Remove target from all examples

* Update package.json

* Apply suggestions from code review

Co-Authored-By: Joe Haddad <timer@zeit.co>

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-10 09:09:28 -05:00
Ty Mick
c837ed151b example: fix npm/yarn install/run instructions (#10023)
**npm** section currently shows both npm and yarn, while **yarn** section shows just npm.
2020-01-09 20:16:44 -05:00
takehiro
66f871b04b Add with redux wrapper hooks (#9954)
Co-authored-by: Luis Alvarez D. <luis@zeit.co>
2020-01-09 10:31:49 -05:00
takehiro
95c2e57e77 with cookie auth latest (#10005) 2020-01-09 09:50:33 -05:00
Soichi Takamura
5fafd1a75b Proposing a new example "with-typescript-graphql" (#9803)
* New example with-typescript-graphql

* Update newer graphql-let

* Apply @lfades 's suggestions

* Use "lib" for tools directory
* Move config decorator to next.config.js
* Apply stricter tsconfig
* mod: hide the word "apollo" from users

* mod: Use variable name `withApollo`

* Use the later version of graphql-let

* Only pages can be in pages

* Life improvements

* fix: .grpahql-let.yml point to the wrong document path

* Use a wider glob for less pitfalls
* Add a note about it in README.md

Co-authored-by: Luis Alvarez D. <luis@zeit.co>
2020-01-08 13:39:00 -05:00
Evgeniy Kumachev
ef6df482bf Add with-mobx-keystone-typescript example (#9844)
* add with-mobx-keystone-typescript example

* Use latest Next.js and removed gitignore

* Fixed my suggestions

* Enabled strict mode and simplified _app

Co-authored-by: Luis Alvarez D. <luis@zeit.co>
2020-01-03 15:10:02 -05:00
Sergio Xalambrí
251f56b81f Tailwind example only run PurgeCSS in production (#9846)
* Tailwind example only run PurgeCSS in production

* Apply lint

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-03 13:01:32 -05:00
Luis Alvarez D
fbcc0e818e
😌 (#9923) 2020-01-03 12:34:20 -05:00
Vinci Rufus
2e3a972033 Update the docker multistage to copy only the necessary files (#9899)
* copy only the necessary files during stage 2 in multi-stage.

* update readme
2020-01-03 11:36:04 +01:00
Bee Ellis
d166840e5a Fix shadowing of apolloClient (#9917)
* Remove redefinition of apolloClient

It seems that the definition of `apolloClient` on line 47 seems to be a intended to be defining the `apolloClient` defined in global scope. That re-declaration of the `apolloClient` variable is removed in favor of assigning the return of `initApolloClient()` to the globally defined `apolloClient`

* Rename the global apollo client to globalApolloClient
2020-01-03 11:13:54 +01:00
Tim Neutkens
d59858e32c
Remove example (#9910)
Closes #8935 #8934
2020-01-03 00:29:34 +01:00
Sarbast Mohammed
d55b464069 fix with-next-offline example (#9900) 2020-01-02 11:50:27 -05:00
Alejandro Garcia Anglada
5be30aae88 Support static export and server hosted build and update docs (#9783) 2019-12-31 10:15:06 -05:00