-
Notifications
You must be signed in to change notification settings - Fork 118
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
Property 'model' does not exist on type 'ObjectDefinitionBlock<"MyModel">' when deploying with serverless and typescript #769
Comments
Also running into this |
Used this template as a recipe: https://github.com/echobind/bisonapp/tree/master/template
First, used Both ways worked |
Hello can you please provide me with an example of your setup, webpack.config, package.json, because I'm running into the graphql duplicate problem with nexus, please!! |
First we moved to nexus altogether, as the latest version uses apollo server which is the reason I was using nexus/schema separately. Everything worked fine out of the box. I assume a combination of TS and some other issues I did not have more time to invest. Eventually I found a few issues related to the queries and I had to give up. We moved to sequelize + apollo server + writing the schema manually. We have 150+ tables so it would have been great to use this framework but I had too many blocks and this is a large project so I don't want to risk using a project which still has a few things to resolve. Sorry I can't be of more help but feel free to contact me. |
No worries, I appreciate the update! Maybe I'll look at switching over to the framework too. Good luck with your project! |
Hey @link2cory, any luck with this? I'm still seeing Property 'crud' does not exist on type 'ObjectDefinitionBlock<"Mutation"> when trying to deploy to heroku. |
@davidhlee So re-reading the thread I don't think that my issue was the same as the underlying problem that sfratini originally reported, but his secondary issue. Receiving the error:
at runtime. This error comes from graphql-js itself and I don't think that the issues are related, but since people were posting solutions (that weren't working for me) to that issue I hopped on the thread. I might as well point to the issue I opened with graphql-js in case it can be of help to you and your setup. Essentially it came down to my serverless packaging plugin's (serverless-offline-plugin) default packaging strategy being incompatible with graphql-js's runtime checks creating a false positive for multiple graphql instances, which they specifically do not allow for reasons stated in the error message. Here is the link to the issue including a workaround: graphql/graphql-js#2801 Hoping that can be of use to someone, but I suspect that it won't be of much use to you, sorry! Good luck though! |
Still no solution for this error? Other related error is: |
What do you mean @jawosis ? |
@sfratini As of 2 days ago they are ending Nexus Framework development and moving efforts over to Nexus/schema: https://github.com/prisma-labs/graphql-framework-experiment I'm currently converting my Nexus Framework to Schema and have run in to this issue as well |
Oh yikes. Well, I think it is an amazing tool/framework but I did found some very specific issues which require workaround. I am just simply starting a big project from scratch so I can't risk having an unstable code on the core of the API. Specially since my concerns were confirmed by shutting down the framework. Which, BTW, I think is the right approach. I can see the schema being a completely different and stable tool in the future. We moved to a manual schema, sequelize as ORM (Prisma is great but had many issues with the integration, maybe it was Nexus and not Prisma) and apollo server. So far so good, although we are advancing slower than if using the framework. |
Just a quick fix dump for anyone not using Ensure your type generations are getting output where you think they are. More on this here, with detailed makeSchema example. Using versions: |
I don't know how obvious this is supposed to be, but your project should have a |
I understand Google brings up a few issues about this and I am 99% sure this has to do with my TS config and/or how the types are loaded but can't seem to find where the issue is in my particular setup.
For background I am using:
Basically, I would want to use serverless to deploy a lambda function into AWS using Apollo server.
tsc command finished correctly. A ts-node transpile of my graphql.ts also finishes without issues, however my serverless deployment is failing.
Some code:
Some config:
Tried:
As a side note, building nexus also fails but due to another issue I believe, which I will deal when I have to:
Another note is that I posted here since the repo for the serverless plugin seems to be either outdated or not being monitored (not very active)
Thanks!
The text was updated successfully, but these errors were encountered: