Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The nextjs example was pretty minimal and seemed to need a little love, so I took the liberty of fixing it up and making it more of an example.
Before:
![image](https://user-images.githubusercontent.com/3198597/65076112-4c35da00-d966-11e9-8a2d-143f6e0c8270.png)
After:
![image](https://user-images.githubusercontent.com/3198597/65075839-a5e9d480-d965-11e9-9d25-b912a368f541.png)
mst-gql
cli seems to have been picking up anothermst-gql.config.js
file (the one inexamples/2-scaffolding
) and using that, (and erroring about a missinggraphql-schema.json
) so I created a correct one to be picked up./scripts/install-mst-gql.sh
does not exist anymore"scripts": {"postinstall": "../../node_modules/.bin/relative-deps"}
inpackage.json
same as other examplesisomorphic-fetch
dependencygetSnapshot
andapplySnapshot
when on server<MyApp>
give it thepageProps
prop that it normally gets (so we don't break use of page-levelgetInitialProps
)store
when calling the page'sgetInitialProps
so it could be used there, e.g. for pre-fetching datadoneTodos
queryassignee: User
property.This to me is now a good little sandbox to demo & play with this library working in an SSR setup. It demonstrates a few issues, including #91 and a couple others (relevant to SSR scenarios) I will be documenting shortly.
This 5-nextjs example could also serve as a decent little boilerplate for a mst-gql + nextjs + apollo app. There are some other enhancements to this end that I haven't yet ported from my personal repo of this (https://github.com/zenflow/mst-gql-next)
schema.js
localhost:3000
)Should I add them here? Or do you think these kinds of things should be out of scope for this example project? I think it would be great if we had a shared robust starting-point for this type of project.
Hope someone wants to merge this! If not, that's ok too 👍