Skip to content
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

Update Examples #69

Merged
merged 18 commits into from
Aug 3, 2019
Merged

Update Examples #69

merged 18 commits into from
Aug 3, 2019

Conversation

chrisdrackett
Copy link
Collaborator

@chrisdrackett chrisdrackett commented Aug 1, 2019

As part of this PR I updated example 1 in the following ways:

  • upgrade to using babel
  • upgrade deps

I've never run the examples myself and wasn't having much luck getting example 1 to run. I switched over to using babel-typescript so that our current typescript errors don't break the build. I got past that part and the page now shows up in the browser, but with errors.

At this point I feel like I might be missing steps, and think my errors probably have something to do with conflicting react versions between the base node_modules and the node_modules in example 1. (Uncaught Invariant Violation: Rendered fewer hooks than expected. This may be caused by an accidental early return statement.)

I don't have any more time right not to spend on it but figured it can't hurt to put my work so far up.

closes #67

- upgrade to using babel
- upgrade deps
@mweststrate
Copy link
Member

No problem, I'll look into it!

@mweststrate
Copy link
Member

mweststrate commented Aug 2, 2019

Pushed some changes, it seems that the typescript generation wasn't really kept up to date.

Fixed the following examples:

  • example 1
  • example 2
  • example 3
  • example 4
  • example 5

Ideally I would want to verify that the other examples are still working, but probably I won't have much time in the coming week, so it might be a good idea to merge this PR already after review, as it fixes quite a bunch of open issues (and makes mst-gql usable in TS again)

@chrisdrackett
Copy link
Collaborator Author

@mweststrate I'm taking a look at this now, I'll see if I can't get all the examples running!

@chrisdrackett chrisdrackett changed the title Update example 1 so its easy to run Update Examples Aug 3, 2019
@chrisdrackett
Copy link
Collaborator Author

ok, I fixed example 3 and updates some docs. I'll see if I can't get 4 and 5 running as well.

@chrisdrackett
Copy link
Collaborator Author

ok, I need to stop for now, but I got everything but example 4 running. If anyone else has experience with Apollo I'd love help getting it going as I've never used it!

@chrisdrackett
Copy link
Collaborator Author

I might go ahead and merge this and open a new issue to fix example 4. @elie222 thoughts?

@chrisdrackett chrisdrackett marked this pull request as ready for review August 3, 2019 21:30
@chrisdrackett chrisdrackett removed the request for review from mweststrate August 3, 2019 21:37
@mweststrate
Copy link
Member

mweststrate commented Aug 3, 2019 via email

@chrisdrackett chrisdrackett merged commit 7d15bf9 into master Aug 3, 2019
@elie222
Copy link
Collaborator

elie222 commented Aug 3, 2019

Will take a look at example 4 tomorrow. Familiar with Apollo

@chrisdrackett
Copy link
Collaborator Author

@mweststrate when using this in my own project I'm seeing a typescript error that I don't see in the examples:

Type 'IOptionalIType<IMapType<any>, [undefined]>' is not assignable to type 'string | number | boolean | Date | IAnyType'.
  Property '[$type]' is missing in type 'IOptionalIType<IMapType<any>, [undefined]>' but required in type 'IAnyType'.

any thoughts on what might be causing this?

@chrisdrackett chrisdrackett deleted the examples/update-1 branch October 9, 2019 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

yarn test and yarn start fails
3 participants