Skip to content

intent load does not resolve reference paths #118

@phryneas

Description

@phryneas

TanStack Intent version

0.0.32

Runtime and version

irrelevant

Package manager and version

irrelevant

Describe the bug and the steps to reproduce it

Currently, intent load only outputs the skill as-is, without touching any relative links. That means that e.g. when using

npx @tanstack/intent@latest load @apollo/client#apollo-client

you end up with

## Reference Files

Detailed documentation for specific topics:

- [TypeScript Code Generation](references/typescript-codegen.md) - GraphQL Code Generator setup for type-safe operations
- [Queries](references/queries.md) - useQuery, useLazyQuery, polling, refetching
- [Suspense Hooks](references/suspense-hooks.md) - useSuspenseQuery, useBackgroundQuery, useReadQuery, useLoadableQuery
- [Mutations](references/mutations.md) - useMutation, optimistic UI, cache updates
- [Fragments](references/fragments.md) - Fragment colocation, useFragment, useSuspenseFragment, data masking
- [Caching](references/caching.md) - InMemoryCache, typePolicies, cache manipulation
- [State Management](references/state-management.md) - Reactive variables, local state
- [Error Handling](references/error-handling.md) - Error policies, error links, retries
- [Troubleshooting](references/troubleshooting.md) - Common issues and solutions

Of course, without knowledge about where this skill was loaded from, these relative paths are now "hanging in the air".

The same not only goes for references, but also for scripts that cannot be found this way.

=> I believe the load command needs to rewrite relative paths in links for this to be usable, either to

-- [TypeScript Code Generation](references/typescript-codegen.md) - GraphQL Code Generator setup for type-safe operations
+- [TypeScript Code Generation](node_modules/@apollo/client/skills/apollo-client /references/typescript-codegen.md) - GraphQL Code Generator setup for type-safe operations

or even as

-- [TypeScript Code Generation](references/typescript-codegen.md) - GraphQL Code Generator setup for type-safe operations
+- [TypeScript Code Generation](/path/to/repo/node_modules/@apollo/client/skills/apollo-client /references/typescript-codegen.md) - GraphQL Code Generator setup for type-safe operations

Your Minimal, Reproducible Example

The context above should be enough without a reproduction.

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

None

Terms & Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions