Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Recommended way of distributing SDK ?

Đang mở
#554 0 bình luận 9 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
20/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
graphql, typescript

Hướng nghiên cứu

Start with package.json and the graphclient build command, reproducing the reported failures with type: module, CommonJS output, and a separate consumer package. Trace the generated SDK's introspection and runtime dependency behavior; done would be a confirmed distribution approach or a clearly scoped implementation and documentation plan.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Hi,

I'm trying to build the generated SDK as a separate package (in the future also adding resolvers, etc).

What is the recommended way of building and distributing the generated SDK ?

I've tried a few things so far but I'm hitting a couple of roadblocks.

E.g. when having "type": "module" in my package.json file and running graphclient build I get introspection errors when generating the schema Failed to generate the schema Error: Failed to fetch introspection from xxxxx: TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts"

If I remove "type": "module" I can build the graphclient and compile the typescript, but when I then try to use the package in a separete codebase I get Module not found: Can't resolve '@graphql-mesh/utils' at runtime.

If I build as CJS using graphclient build --fileType js and import that in my other repo, I also get Can't resolve '@graphql-mesh/utils'

Any advice is much appreciated !

Ngôn ngữ chính
TypeScript
Star
186
Fork
49
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Chúng tôi chưa kiểm tra các tệp thiết lập môi trường của dự án này. Hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của graphprotocol/graph-client

Tất cả issue của graphprotocol/graph-client

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.