-
Notifications
You must be signed in to change notification settings - Fork 17
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
Cruddl with Typescript project #91
Comments
My dependencies currently look like this: "dependencies": {
"chalk": "^2.4.2",
"cruddl": "^1.0.2",
"dotenv": "^8.0.0",
"graphql-yoga": "^1.18.3",
"merge-graphql-schemas": "^1.7.0"
},
"devDependencies": {
"@types/jest": "^24.0.18",
"@types/node": "^12.7.2",
"@types/ws": "^6.0.3",
"@typescript-eslint/eslint-plugin": "^2.0.0",
"@typescript-eslint/parser": "^2.0.0",
"cross-env": "^5.2.0",
"eslint": "^6.2.2",
"eslint-config-prettier": "^6.1.0",
"jest": "^24.9.0",
"nodemon": "^1.19.1",
"prettier": "^1.18.2",
"rimraf": "^3.0.0",
"ts-jest": "^24.0.2",
"ts-node": "^8.3.0",
"typescript": "^3.5.3"
} |
Try running |
If that is required, shouldn't it be a dependency of cruddl or graphql-yoga? |
It should be however I think graphql-yoga requires an older version/package of Apollo Server afaik (which is no longer updated), I don't use yoga, I use apollo server directly
The schema here being the schema generated by Cruddl, works perfectly (: |
I did that anyway, and got another error:
|
Yup, as expected it was the apollo-server-core package not being installed, your best bet is using the code I provided above, and here's the rest to generate the schema:
|
@itsezc have you seen any strange issues with response caching when using Apollo like this? All my responses are getting cached on a per-client basis, including mutations. It is really strange behavior to cache mutation responses by default. I literally cannot execute more than one record insertion using the same query in a row without restarting the server. |
@robross0606 I have never seen that happen to me, with or without Cruddl I still had a look into Apollo Server caching and the closet thing I could find was: |
@itsezc, I'm absolutely baffled by this behavior. I opened a new ticket (#92) to discuss. I'm seeing similar behavior across multiple different GraphQL client test tools (Insomnia, Playground, etc.). Since cruddl is all auto-wired I can't even figure out where to put a breakpoint or control log output to tell what's happening. |
I think we can just switch to ApolloServer. graphql-yoga has caused quite a few headaches by just trying to update it a few times... |
Agreed. A version of suggestions from @itsezc worked fine for me. |
This has been addressed on #95 |
Having a heckuva time even following your demo/setup code in the Readme due to Typescript errors on cruddl dependencies. Getting errors such as:
I've tried mucking with my
tsconfig.json
and importing several different@types/
to mypackage.json
to no avail. What am I missing?The text was updated successfully, but these errors were encountered: