Skip to content

Conversation

@gibson042
Copy link

Description

Represent operation descriptions as JSDoc doc comments. For example, request document

""" Get summary information about the specified user. """
query user {
    user(id: 1) {
        id
        username
        email
    }
}

should produce typescript-generic-sdk output like

 export function getSdk<C>(requester: Requester<C>) {
   return {
+    /** Get summary information about the specified user. */
     user(variables?: UserQueryVariables, options?: C): Promise<UserQuery> {
       return requester<UserQuery, UserQueryVariables>(UserDocument, variables, options) as Promise<UserQuery>;
     }
   };
 }
 export type Sdk = ReturnType<typeof getSdk>;

Related #1272

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Updated relevant unit tests and snapshots.

Checklist:

  • I have followed the
    CONTRIBUTING doc and the
    style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@changeset-bot
Copy link

changeset-bot bot commented Nov 6, 2025

⚠️ No Changeset found

Latest commit: 5a39ec8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant