Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(core): export client entry from fuse/client.ts #102

Merged
merged 4 commits into from
Dec 17, 2023

Conversation

mxstbr
Copy link
Member

@mxstbr mxstbr commented Dec 17, 2023

Standalone requires a user to do these imports; that feels unintuitive because useFragment appears to be at the same level of abstraction as useQuery, and yet they have to import them from two different places:

import { useQuery } from 'fuse/client'
import { graphql, useFragment } from '../../fuse'

This PR adds export * from 'fuse/client' to @/fuse/index.ts so that the imports can instead be centralized:

import { graphql, useFragment, useQuery } from '../../fuse'

Copy link

vercel bot commented Dec 17, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
fusejs-org ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 17, 2023 8:06pm
spacex-fuse ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 17, 2023 8:06pm

@mxstbr mxstbr changed the title Export client from index RFC (standalone): Export * from fuse/client from @/fuse/index to centralize client imports Dec 17, 2023
Comment on lines +217 to +220
await appendFile(
baseDirectory + '/fuse' + '/index.ts',
'\nexport * from "fuse/client"',
)
Copy link

@cstrnt cstrnt Dec 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will probably interfere with the change made in #100 since the hooks are run as part of the codegen

@JoviDeCroock JoviDeCroock changed the title RFC (standalone): Export * from fuse/client from @/fuse/index to centralize client imports feat(core): export client entry from fuse/client.ts Dec 17, 2023
@JoviDeCroock JoviDeCroock merged commit d97175a into main Dec 17, 2023
4 checks passed
@JoviDeCroock JoviDeCroock deleted the export-client-from-index branch December 17, 2023 20:08
@mxstbr
Copy link
Member Author

mxstbr commented Dec 17, 2023

Thanks for adding the changeset. 💜

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.

3 participants