生成刺激性的打字稿类型
虽然切片机类型得到更好的支持,但会有所帮助的是,如果Prismic将提供标准的Swagger/Open API或GraphQl模式我的存储库的类型进入项目,并为每个切片手动使用。
我知道您提供API浏览器 - > https://my-org.prismic.io/api/api/v2 )和a graphiql-> https://my-org.prismic.io/graphql ,但无法真正得到它们使用以前的代码生成器,因为我无法从API浏览器中获得标准的Swagger.json或GraphQl架构。
获取这些标准接口将使我能够再次运行发电机,以在我对PRISMIC中的自定义类型进行更改的任何时候更新生成的TS。
我尝试关注此链接自定义类型API,但它不起作用。
While slices machine types are better supported, something that will help us is if Prismic would provide a standard Swagger/Open API or Graphql Schema so I can run swagger-typescript-api or Generate code from your GraphQL schema to get the types from the custom types of my repository into the project and manually use for each slice.
I know you provide API browser -> https://my-org.prismic.io/api/v2) and a GraphiQL -> https://my-org.prismic.io/graphql but can't really get them working with the previous code generators as I can't get the standard swagger.json or Graphql schema from your API Browser.
Getting those standard interfaces would allow me to run the generators again to get the generated ts updated anytime I made changes to the custom types in Prismic.
I tried following this link Custom Types API but it's not working.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论