facebook / facebook/relay

Bundling Relay fragments with packages published to NPM

Open
#4,773 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
19k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

I've been searching all over for mentions of doing something like this but alas have not been able to find much of anything.

The idea is very simple. I have a package that contains some React components that internally use Relay. This package is published to NPM as its own library. I have another package that consumes the library as a dependency and uses the provided components as building blocks for a larger application. However, when I include a fragment defined in the library package in a query defined in the application package `relay-compiler` emits an error indicating that the included fragment is "undefined"... presumably it cannot locate this "third party" fragment.

Is something like this possible?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.