-
Notifications
You must be signed in to change notification settings - Fork 311
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
V8. Types generation error: Cannot find package 'es-toolkit' #1214
Comments
And what is the usage for open-telemetry? |
If I install manually, I get following errors:
|
For generating types using js, example in docs |
Can you also provide documentation on how to add types for custom scalars. |
@ziimakc thanks a lot for this feedback, will fix ASAP. Regarding custom scalar documentation, yep it is high on my list. |
This is fixed by #1217 |
https://graffle.js.org/extensions/opentelemetry
Interesting, that appears to be coming from the introspection query? Can you share more context about the error you are seeing?
For now please refer to the working example https://graffle.js.org/examples/custom-scalar/custom-scalar. I will be adding a guide about custom scalars in the coming days or weeks. If you have specific questions meanwhile feel free to ask.
Fixed by #1218 |
Fixed by #1219 |
@ziimakc the only outstanding issue here now is #1214 (comment) I think. If you encounter more problems, let's track them in new issues. I think the issue you're having is particular to the GraphQL server you're trying to introspect. Maybe there is something we can do to make it work though, like, exposing some configuration in the generator of how the introspection query will be sent etc. Internally, we re-use the introspection extension: https://graffle.js.org/extensions/introspection. It definitely can work, so that's why I think there's something more particular to the schema you're working with. Curious to learn more about it. |
@jasonkuhrt regarding Error message v82:
1 full error:
Introspection looks like this:
|
@jasonkuhrt I would like to add it to gql types generator script, similar to gql-codegen:
Maybe you can also explain a reason to reimplement |
graphql-request never had a generator. Graffle is a self contained tool. I am not sure what the benefit to being a code-generator plugin would be, I'm not familiar with the tool. My concern was that it is not simple enough. |
Thank you for the introspection details, I'll take another look today. |
So regarding:
It seems that for some reason your schema does not support the introspection document being sent. Can you share with me an introspection query that works for your schema? You can log what introspect sends and then send it again manually with your own tweaks using const pokemon = Pokemon.create().use(Introspection()).anyware(async ({ exchange }) => {
console.log(exchange.input.request)
return await exchange()
})
|
Will send you introspection later, it does work fine for requests made by graphiql web sandbox. This is the plugin that I was using for getting types when using graphql-request. |
Not sure you know yet but Graffle has a document builder that I personally prefer. That interface needs its own generator. If you are not using the document builder you do not need to use the Graffle generator. Let me know if this was not clear to you, as the documentation should achieve that. I recently rewrote the getting started guide. Here is where document builder gets introduced: https://graffle.js.org/guides/getting-started#🧙-meet-document-builder. |
@jasonkuhrt error is thrown when I run
Here is
Here is directive response:
|
Not sure what is supposed to do, query works fine as I generated types from file.
|
Thanks for the updates. Will look again. Is the URL public such that I could try introspecting against myself? That would allow me to iterate without going back and forth with you about it. |
@jasonkuhrt no, it's a localhost :( |
And not open source right? haha :) |
@jasonkuhrt you can run this gql server with any simple schema to reproduce issue: https://async-graphql.github.io/async-graphql |
Awesome thanks that will help. |
So this works just fine: import { Graffle } from './entrypoints/__Graffle.js'
import { Introspection } from './extensions/Introspection/Introspection.js'
const graffle = Graffle
.create({
schema: `http://localhost:8000`,
})
.use(Introspection())
const result = await graffle.introspect()
console.log(result) It is only when the generator runs... (I can reproduce, thanks @ziimakc) |
Ah this fails: import { Graffle } from './entrypoints/__Graffle.js'
import { Introspection } from './extensions/Introspection/Introspection.js'
const graffle = Graffle
.create({
schema: `http://localhost:8000`,
})
.use(Introspection({
options: {
directiveIsRepeatable: true,
schemaDescription: true,
specifiedByUrl: true,
inputValueDeprecation: true,
// todo oneOf
},
}))
const result = await graffle.introspect()
console.log(result) |
The issue is the option: |
So it seems to be a missing feature (or bug) on the part of that GrahQL server: async-graphql/async-graphql#1621. I will now think about how to make Graffle able to circumvent this issue. Probably what I will do is remove the option by default and let users add it via generator config. |
Thanks for all the feedback @ziimakc, you helped me find a major flaw in Graffle (it assumed the names of the root types). There are things I still want to improve with introspection and feedback the user gets but in general the base functionality is now in place: |
Description
When running
pnpm graffle --schema my_url
following error is thrown:Same for
@opentelemetry/api
Version:
8.0.0-next.78
The text was updated successfully, but these errors were encountered: