I however am trying to run graphql codegen to generate a typescript ready file.
So I need the url to the actual graphql schema endpoint.
As can be seen used in the following link Home – GraphQL Code Generator.
Can anyone direct me where I can find that please?
Well that’s to bad.
But thanks for the info @Matias.Monday.
Has anyone suggested to them to add that functionality?
It’s not a security risk issue and the JSON version is already shared.
So I don’t see why they would have an issue with allowing the public access to it.
Benefit wise…
It would make adding typescript to the auto generated integration apis much easier for developers.
I’m assuming no one’s asking about this feature because they saw the answer on this thread which makes it look like Monday.com isn’t gonna add this functionality.
Even I was debating going through the hassle of creating an account just to ask this question and potentially get zero resolution on it.
90% of people using Monday.com’s GraphQL API will want TypeScript types, and the GraphQL Codegen library is the most-common way to get those types.
I spent quite a long time searching around trying to figure out how to get this working before stumbling on this thread where it looks like Monday.com doesn’t wanna bother providing a simpler endpoint.
If I’m going to have to parse the schema myself and convert it to a different format, then that means I have to use GraphQL Codegen in a way it wasn’t intended.
Is it possible this one endpoint could be added, so it’ll be easier to use Monday.com’s GraphQL API with proper type safety?
Another issue, graphql.buildClientSchema doesn’t even exist in the latest version of the library. Now I have to waste more time trying to figure this out when it could be more-simply provided by the API authors.
This is the correct import:
import { buildClientSchema } from 'graphql/utilities'
But the error I received was:
Error: Invalid or incomplete introspection result. Ensure that you are passing “data” property of introspection response and no “errors” was returned alongside: { data: { __schema: [Object] } }.
And this is what’s in the data returns from that get_schema JSON fetch: