Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
447 commits
Select commit Hold shift + click to select a range
53865ed
Simplify EntryPointContainer types
SamChou19815 Apr 3, 2025
842d917
Fix repo sync source under test folder [1/n]
marcoww6 Apr 3, 2025
52f1e24
compiler client 3D changes to support exec time resolvers
lynnshaoyu Apr 4, 2025
1fb4eee
Add type Annotations to the source of sync'ed relay code [4/n]
marcoww6 Apr 4, 2025
a66117c
Add type Annotations to the source of sync'ed relay code [5/n]
marcoww6 Apr 4, 2025
79c9ca4
add util for generating typename prefixed DataID
monicatang Apr 8, 2025
af3bbf5
add directive arg for protocol conformance
Apr 8, 2025
76d41ca
generate direct TM to data provider conformances for .h
Apr 8, 2025
d800611
Include mixed loggerContext in handled snapshot errors
itamark Apr 8, 2025
aa6f91a
Generate exec time ASTs in rootFragment $normalization files
tyao1 Apr 9, 2025
c13dbb1
Fix typos and improve clarity in the tutorial
evanyeung Apr 9, 2025
f123abe
thread log function from environment to RelayRecordSourceProxy
monicatang Apr 9, 2025
2bdd67f
fix id collisions logging
monicatang Apr 9, 2025
0414c9a
Replace $Diff with Omit in relay
SamChou19815 Apr 10, 2025
bb7bde0
delete empty docs pages
monicatang Apr 10, 2025
75291f1
Add an extra option for --json to print error and write file
tyao1 Apr 11, 2025
eeac8b2
Pre-suppress react-relay errors ahead of Deploy 0.267.0 to fbsource
panagosg7 Apr 11, 2025
7bf190f
Remove orphaned page "workflow"
captbaritone Apr 11, 2025
81391e0
Use Omit instead of $Diff for $RelayProps
SamChou19815 Apr 11, 2025
aeb26c3
Include React 19 in peerDependencies (#4944)
KrzysztofKarol Apr 12, 2025
be57753
update test project artifacts
monicatang Apr 12, 2025
ce0b8c3
delete some pages
monicatang Apr 12, 2025
2a57a6b
Deploy 0.267.0 to xplat
panagosg7 Apr 12, 2025
3dba653
Update hermes-parser and related packages in fbsource to 0.28.0
j-piasecki Apr 15, 2025
8bb15e2
upgrade to nightly-2025-04-14
diliop Apr 15, 2025
33eb8ad
set style edition to 2024
diliop Apr 15, 2025
ebd2946
fix rust toolchain & rustfmt versions
diliop Apr 15, 2025
07ef8d2
- add exec time resolvers directive to split module import
lynnshaoyu Apr 15, 2025
ee75c24
keep rustfmt version and revert rust toolchain version
diliop Apr 16, 2025
8297b15
update indexmap
krallin Apr 16, 2025
010b8e1
make footer logo smaller
monicatang Apr 16, 2025
45fc4be
Deploy 0.268.0 to xplat
SamChou19815 Apr 16, 2025
2fd469a
check for .read_time_resolvers in module_metadata before adding exec …
lynnshaoyu Apr 16, 2025
479fde8
Remove migration and compatability pages
captbaritone Apr 16, 2025
2784dfc
Rework onboarding flow
captbaritone Apr 17, 2025
543918e
- add ability to configure operationModuleProvider path separately fr…
lynnshaoyu Apr 17, 2025
0a7da69
Update action dependencies (#4957)
captbaritone Apr 17, 2025
38683fb
Update Cargo.lock (#4956)
facebook-github-bot Apr 17, 2025
01f72cb
vendor smallvec with bincode2 support
markbt Apr 18, 2025
db5c63d
Update Cargo.lock (#4958)
captbaritone Apr 18, 2025
9452851
- fix tests config to unbreak oss
lynnshaoyu Apr 19, 2025
2fcc6fa
Update hermes-parser and related packages in xplat to 0.28.1
gkz Apr 21, 2025
9ba58eb
generate data driven dependencies for static resources used by exec r…
lynnshaoyu Apr 22, 2025
0470769
Remove "TBD" sections from the docs
evanyeung Apr 22, 2025
a34a090
Avoid panic in integration tests (#4960)
captbaritone Apr 22, 2025
616a78c
Repro of issue where @waterfall queries are not fetched
captbaritone Apr 22, 2025
23f5810
Handle relay:// json schema requests even outside of Relay projects (…
captbaritone Apr 23, 2025
31c8c2e
Explicity opt out of generating es modules
captbaritone Apr 23, 2025
c81ed0e
observeFragment clean up and tests
captbaritone Apr 23, 2025
06cf2c8
Update vscode extension GitHub action to match CI (#4963)
captbaritone Apr 23, 2025
371c5d7
Bump VSCode extension version (#4962)
captbaritone Apr 23, 2025
66550c3
Quick Start: Add note about watchman
captbaritone Apr 23, 2025
bd321a2
Make generating ES modules the default
captbaritone Apr 23, 2025
c7078a1
Iteration on new quick start guide based on feedback (#4966)
captbaritone Apr 23, 2025
63c8437
Update compiler test project to reflect new default config option (#4…
captbaritone Apr 23, 2025
288aebd
Make store an optional argument when constructing a Relay Environment
captbaritone Apr 23, 2025
91c22be
Update VSCode docs/errors to use pathToRelay (#4965)
captbaritone Apr 24, 2025
677c1e3
Fix nullable refetchedFragmentRef in checkSameIDAfterRefetch (#4945)
KrzysztofKarol Apr 24, 2025
9d1fe44
load component module earlier into record store 1/2
lynnshaoyu Apr 24, 2025
07e662e
Migrate most blockquotes in our docs to admonitions
evanyeung Apr 24, 2025
9eb1ad0
fix relay reader module import bug
lynnshaoyu Apr 25, 2025
1558652
Fix code examples in the connections tutorial page
evanyeung Apr 25, 2025
4cab6f1
Support column in go to definition (#4969)
captbaritone Apr 25, 2025
15046db
Add a test case for rootFragment on client field
tyao1 Apr 25, 2025
c73aa7f
Deploy 0.269.1 to xplat
Apr 29, 2025
217f70a
Lint against slow for of loops
captbaritone Apr 30, 2025
91ec327
Move the "Organizing Operations" tutorial page into the guides
evanyeung May 1, 2025
ea0ad0f
Pre-suppress errors related to `Object.assign`
SamChou19815 May 1, 2025
5893f3a
Update language to reference hooks not containers (#4964)
captbaritone May 1, 2025
be486f2
add list for allowed private fields on TMs
May 1, 2025
1e4b164
Avoid duplication in config JSON Schema
captbaritone May 1, 2025
30dedbe
Add TypeWithDirectives trait
cuhtis May 2, 2025
8313b24
relay-compiler: allow bare paths for CommonJS provider references (#4…
sjbarag May 2, 2025
db40ac3
Avoid expensive for-of loops in RelayReader (#4978)
captbaritone May 2, 2025
bb57add
v19.0.0
evanyeung May 2, 2025
19c33bb
Update quick start guide to align with new version of Relay
captbaritone May 2, 2025
2e38211
Update docs for alias before v19 release
evanyeung May 2, 2025
4a2205a
v19.0.0
evanyeung May 2, 2025
cc3c240
Remove unused variable (#4980)
captbaritone May 2, 2025
924ca70
Add GitHub links to release notes tool (#4979)
captbaritone May 5, 2025
c6774c7
Relay 19 release notes blog post
captbaritone May 5, 2025
3de18da
Fixups to quickstart (#4983)
captbaritone May 6, 2025
f25a9d1
add missing generic type parameter for mutation tutorial example (#4981)
itsjoeoui May 6, 2025
4607fc8
Remove haste related config that's equivalent to the builtin one in Flow
SamChou19815 May 6, 2025
fb9f4d7
Parser option to allow literal string aliases
May 7, 2025
1182ca6
Support enquoted field alias
May 7, 2025
1eca4a5
Stop unnecessary runtime transforms
lynnshaoyu May 8, 2025
3b245dc
Upgrade Rust tokio
May 8, 2025
6c2ede8
applying rustfix to fbcode
cjlongoria May 9, 2025
9cbd126
Fix excluding generated dir under xplat_react
tyao1 May 10, 2025
642f964
Update Cargo.lock (#4988)
facebook-github-bot May 10, 2025
50fcf87
Add page documenting the compiler config (#4985)
captbaritone May 10, 2025
70b27df
Fill in missing documentation in compiler config
captbaritone May 10, 2025
aa5263e
Update tokio and some tokio- crates
May 11, 2025
1073517
Fix variable name for imported model resolvers when using ES module i…
captbaritone May 12, 2025
0b10aa5
Make comment into doc comment in config struct (#4989)
captbaritone May 12, 2025
e59619e
Compiler Docs: Improve separators in JSON arrays and objects (#4990)
captbaritone May 12, 2025
3522921
Prevent json schema css for h2 from leaking into the rest of the site
captbaritone May 12, 2025
281d76a
Update babel transform to default to default to ES modules to match c…
captbaritone May 12, 2025
5144ba2
Deploy 0.270.0 to xplat
pieterv May 13, 2025
71d2b5b
Upgrade clap and clap_complete
abesto May 13, 2025
16cd200
Run client edge tests for both versions of useFragment
captbaritone May 13, 2025
342c2f1
Update Cargo.lock (#4993)
captbaritone May 13, 2025
48c81ad
Regression test for client edge server data discovered missing in res…
captbaritone May 14, 2025
4177f3e
Pass client edge context to resolver root fragments
captbaritone May 14, 2025
611f6d9
Fetch missing client edge server queries discovered in nested fragmen…
captbaritone May 14, 2025
7eca724
Add docs page describing the Relay lint rules
captbaritone May 15, 2025
96f8c37
Deploy 0.271.0 to xplat
SamChou19815 May 15, 2025
6cae2e9
Prepare for `React.forwardRef` removal from libdef for buildReactRela…
SamChou19815 May 16, 2025
9f242bb
Pass compiler config json schema as a prop (#4997)
captbaritone May 16, 2025
40fbe7c
add annotations to useRefetchableFragmentNode-test.js
panagosg7 May 19, 2025
ca7ddea
Surface prefetchExpiryInHours from the entrypoint
May 21, 2025
ace2f4c
Deploy 0.272.0 to xplat
May 22, 2025
4dad5fb
Update glob from 0.3.1 to 0.3.2
May 23, 2025
9b7f643
Parse some docblock syntax and gen markdown for `useRelayEnvironment`
tyao1 May 23, 2025
c3b70bc
Handle args and returns, convert useLazyLoadQuery
tyao1 May 23, 2025
6118d5b
Update rustc-hash from 2.1.0 to 2.1.1
May 23, 2025
427bf84
Deploy 0.272.1 to xplat
SamChou19815 May 25, 2025
a6f0fb3
Update thiserror from 2.0.7 to 2.0.12
May 26, 2025
b270988
Fix incremental bug where resolver artifacts were not cleaned up
captbaritone May 27, 2025
b401d74
Update Cargo.lock (#5006)
facebook-github-bot May 27, 2025
6f1394f
Fix Clippy errors
captbaritone May 27, 2025
f3a9afa
Support normalized responses in OperationExecutor
tyao1 May 28, 2025
21926a5
Expose a loadClientQuery helper
tyao1 May 28, 2025
2c77387
Replace out of date compiler readme with link to up-to-date docs page…
captbaritone May 29, 2025
f3d0bed
Prefer more performant for loops in hot modules (#4996)
captbaritone May 29, 2025
8fbc0b9
Deprecate returning non-model weak types from resolvers (#5004)
captbaritone May 29, 2025
b801db0
Fix nested @defer when server doesn't support streaming
tyao1 May 29, 2025
6ab766a
Add VSCode tasks for common commands (#5003)
captbaritone May 29, 2025
8c30f80
A couple grammar fixes (#5008)
gameroman May 30, 2025
c21690c
Revert D74735939
May 30, 2025
a3ddd58
Generate valid types when the same field is selected by both conditio…
vhfmag May 30, 2025
b5294a4
Revert D73223348
May 30, 2025
4136a8c
Fix operation executor for exec time
tyao1 May 31, 2025
87f901c
Deploy 0.272.2 to xplat
SamChou19815 May 31, 2025
729cd0c
Update strum from 0.26 to 0.27
Jun 1, 2025
0298eec
Regenerate Cargo.oss.lock
Jun 2, 2025
00594e1
Fix nested @defer + 3D when server doesn't support streaming
tyao1 Jun 2, 2025
7bb4b15
Delete all autocargo project-level edition settings
Jun 2, 2025
8be0df8
Update Rust compiler version in ci.yml to fix CI (#5010)
evanyeung Jun 2, 2025
ba09a88
In a exec time query, mark query as completed if all initial payloads…
tyao1 Jun 3, 2025
faaaacf
third-party: Update ouroboros to 18.5
Jun 3, 2025
dce1a2e
Do not mark a query as inactive when waiting for resolver or server p…
tyao1 Jun 4, 2025
239f6d9
Fix operation cleanup in RelayModernMockEnvironment
Jun 4, 2025
f45f1e5
sort-imports: Update Rule Definition
yungsters Jun 10, 2025
21d344b
sort-imports: ESLint Suppression Comments
yungsters Jun 10, 2025
abedb68
Fix typo in description of the @throwOnFieldError directive
Jun 10, 2025
5cb92f4
Remove docs on comet_routing_prefetch
Jun 10, 2025
2b85d37
Add argument definitions to usePaginationFragment docs (#5015)
DrillableBit Jun 11, 2025
5ec796e
Annotate read time resolver promises
tyao1 Jun 12, 2025
449490b
Deploy 0.273.1 to xplat
pieterv Jun 12, 2025
60b906b
log saved state info query time in relay compiler
lynnshaoyu Jun 13, 2025
cba7007
Add more time loggings in try_saved_state
tyao1 Jun 13, 2025
9facd47
Update graphql.md readability (#5018)
jmaloon Jun 13, 2025
56ca85d
Fix compiler playground build (#5019)
captbaritone Jun 13, 2025
df47dc1
v20.0.0
evanyeung Jun 14, 2025
6985d7d
Bump docs version to v20
evanyeung Jun 14, 2025
fae0241
Add blog post for Relay v20 Release
evanyeung Jun 14, 2025
3320532
Emit raw query text in artifact for `@relay_test_operation` operation…
jakobkhansen Jun 16, 2025
ff27db4
Disable persisted queries in validate mode (#5013)
aryaniyaps Jun 17, 2025
7e8f975
Make many relay object types readonly to prevent future flow errors a…
SamChou19815 Jun 18, 2025
40e7b46
Add platform info maker fn for fragment spread
janettec Jun 18, 2025
94eaa54
Make MockResolvers readonly
SamChou19815 Jun 18, 2025
4c84bed
Make many relay object types readonly or annotate objects to prevent …
SamChou19815 Jun 18, 2025
48e3351
Add annotations or make things readonly to prepare for object literal…
SamChou19815 Jun 19, 2025
e77cae6
Make many relay object types readonly or annotate objects to prevent …
SamChou19815 Jun 20, 2025
5ee67b6
Update logos from 0.12 -> 0.15
forrestsmithfb Jun 23, 2025
a6ab8e5
Add pass through renders type TChildren (#5021)
Jun 23, 2025
04ec101
Update Cargo.lock (#5026)
facebook-github-bot Jun 24, 2025
7461eea
Update hermes-parser and related packages in xplat and socialvr to 0.…
gkz Jun 24, 2025
ff4bf01
Pre-suppress errors in relay ahead of 0.274.0 release
SamChou19815 Jun 24, 2025
6b5369a
Deploy 0.274.0 to xplat
SamChou19815 Jun 24, 2025
68b3f9b
Stop picking up config_id in @live Relay
Jun 25, 2025
4368eb8
Strip float_roundtrip and unbounded_depth from serde_json for no_std …
CookieComputing Jun 25, 2025
4f78bca
Add annotations to array and object literal declarations to fix futur…
SamChou19815 Jun 25, 2025
716d6e0
Deploy 0.274.1 to xplat
gkz Jun 26, 2025
6c7977e
Add validation for duplicate directives on fields
Jun 27, 2025
9c42f72
Revert D77399084
Jun 27, 2025
3330731
Make `variables` prop in commitMutation param `NoInfer` to improve er…
SamChou19815 Jun 28, 2025
575b78e
Update hermes-parser and related packages in xplat/arvr/socialvr to 0…
gkz Jun 28, 2025
5776051
Deploy 0.274.2 to xplat
gkz Jun 28, 2025
42e8f83
Add annotations or make things readonly to prepare for object literal…
SamChou19815 Jun 28, 2025
c052f56
Enable log kv_unstable_std feature in default universe
Jun 30, 2025
c77d972
Regenerate Cargo.oss.lock
Jun 30, 2025
cfd2ebd
Pre-suppress errors ahead of locking down natural inference behavior …
SamChou19815 Jun 30, 2025
94f107a
required-on-nonnull-field checking to descend into inline fragments
gordyf Jul 1, 2025
3c494fc
required-on-nonnull-field checking to consider fields in sibling inli…
gordyf Jul 1, 2025
31c024a
Daily `arc lint --take PRETTIERJAVASCRIPT`
Jul 1, 2025
68afcf3
Remove extraneous println
gordyf Jul 1, 2025
11932da
Make `variables` prop in `useLazyLoadQuery` `NoInfer` to improve errors
SamChou19815 Jul 3, 2025
f22f963
Simplify lazy_static dependency
Jul 3, 2025
c266277
Regenerate Cargo.oss.lock
Jul 3, 2025
27c0a38
Deploy 0.275.0 to xplat
SamChou19815 Jul 4, 2025
f095a75
Update schema-flatbuffer with current version of flatbuffer
Jul 9, 2025
8aa82a2
Revert D77939007: Update schema-flatbuffer with current version of fl…
mjmahone Jul 9, 2025
cf63740
Update schema-flatbuffer with current version of flatbuffer - v2
Jul 9, 2025
c3b07ef
Rust code for Hack Client LSP
Jul 9, 2025
1bcd56c
Update flatbuffers 24.12.23 -> 25.2.10
Jul 9, 2025
a589d6c
[relay+ Update Cargo.oss.lock
Jul 9, 2025
2a07922
Allow ClientQuery in usePreloadedQuery
tyao1 Jul 9, 2025
cb09a22
bump flatbuffer max tables to allow parsing large schemas
Jul 9, 2025
7bd0950
Re-use verified flatbuffer reading
mjmahone Jul 9, 2025
349f161
Update url crate 2.5.2 -> 2.5.4
Jul 10, 2025
daa7235
Update platform010 & platform010-aarch64 symlinks
diliop Jul 14, 2025
6314d78
Make `variables` arg in `fetchQuery` `NoInfer` to improve errors
SamChou19815 Jul 14, 2025
f933d6c
Improve missing fragment data error message to point to `@alias` docs.
captbaritone Jul 15, 2025
4660b13
Update compiler.md to correct spelling of support (#5034)
Uk1288 Jul 15, 2025
ad4b15c
Relay type information tool
kassens Jul 16, 2025
193d6c3
Support quickfix suggestions in validation rules
ginfung Jul 16, 2025
b208fed
rmcp 0.2.1 -> 0.3.0, schemars 0.8.21 -> 1.0.4 (#5035)
Jul 17, 2025
4622d48
fix conflicting lint
Jul 18, 2025
19c2529
add config + validation to enable enforcement of not using fields
Jul 18, 2025
8caf938
type information tool
kassens Jul 18, 2025
e2aaaa8
Make schema def rendering more robust (#5036)
captbaritone Jul 18, 2025
292ae5a
config: allow 'extra' in root of single-project config files (#5030)
sjbarag Jul 19, 2025
cbd9c0f
Deploy 0.276.0 to xplat
marcoww6 Jul 19, 2025
cd4a328
Prepare relay for prettier v3
SamChou19815 Jul 21, 2025
8a402b1
Daily `arc lint --take PRETTIERGRAPHQL`
Jul 23, 2025
c3dcd98
Update tokio 1.45.0 -> 1.46.1
Jul 23, 2025
c6316e5
Fork internal vs external prettier plugin resolution
SamChou19815 Jul 23, 2025
8839d34
Update broken url in error message
Jul 23, 2025
695d958
Adding ruff_python_formatter to 3rd party libs
WeixiMa Jul 23, 2025
1dffaa0
Update clap4 4.5.38 -> 4.5.41
Jul 24, 2025
d7caa88
Deploy 0.277.1 to xplat
SamChou19815 Jul 24, 2025
43068aa
Update Cargo.oss.lock
Jul 24, 2025
0c17820
Update futures 0.3.30 -> 0.3.31
Jul 25, 2025
b7cb31b
Update log 0.4.22 -> 0.4.27
Jul 25, 2025
4441b28
Bump hermes-parser related packages across fbsource
SamChou19815 Jul 25, 2025
cb2dcaf
Pre-suppression errors for functionT in xplat js
marcoww6 Jul 25, 2025
a5782ba
v20.1.0
lynnshaoyu Jul 26, 2025
a6f3fd1
Bump prettier to v3 in relay
SamChou19815 Jul 28, 2025
9139dca
third-party/rust: Make once-cell usable in no-std
Jul 29, 2025
73291ee
v20.1.0
lynnshaoyu Jul 29, 2025
b7c43a2
Update Cargo.lock (#5042)
facebook-github-bot Jul 30, 2025
2a57355
Back out "Disable persisted queries in validate mode"
captbaritone Jul 31, 2025
673c198
Replace $FlowIssue with $FlowFixMe
SamChou19815 Aug 1, 2025
41766f5
Replace $FlowIssue with $FlowFixMe
SamChou19815 Aug 1, 2025
4b53cca
doc(useSubscription): config argument should be memoized (#5033)
pavelglac Aug 1, 2025
0d3d84c
Deploy 0.278.0 to xplat
pieterv Aug 1, 2025
b536875
Handle json schema consts in compiler config doc generation (#5047)
captbaritone Aug 2, 2025
cb60dbd
fix(relay-runtime): prototype less payloads (#5043)
pavelglac Aug 2, 2025
f2b3cf8
Update prettier-plugin-hermes-parser in fbsource to 0.31.1
SamChou19815 Aug 2, 2025
ac292ae
Update serde 1.0.185 -> 1.0.219
Aug 2, 2025
7f365e2
Replace `$FlowFixMe(Props|State|Empty)` with just `$FlowFixMe`
SamChou19815 Aug 4, 2025
aa049d3
Remove random variants of suppress_types that have been fully cleaned up
SamChou19815 Aug 5, 2025
4e9f30d
flow] Mass replace `$FlowIgnore` with `$FlowFixMe` in relay
SamChou19815 Aug 5, 2025
8f83bce
Update clap (4.5.41 -> 4.5.42) /clap_complete (4.5.50 -> 4.5.55)
Aug 6, 2025
710dcd2
v20.1.1
evanyeung Aug 6, 2025
f149a3c
Merge commit '710dcd2a66f6f18846314ffb5c1ba75f7733c4ce' into relay-20…
zth Oct 7, 2025
029b102
fixes after merge
zth Oct 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
47 changes: 47 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ module.exports = {
'array-bracket-spacing': 'off',
'comma-dangle': 'off',
'max-len': 'off',
'no-extra-parens': 'off',
'space-before-function-paren': 'off',
'ft-flow/object-type-delimiter': 'off',
'babel/flow-object-type': 'off',
Expand Down Expand Up @@ -89,4 +90,50 @@ module.exports = {
'relay-internal/no-mixed-import-and-require': 'error',
'relay-internal/sort-imports': 'error',
},
overrides: [
{
files: ['packages/relay-runtime/**/*.js', 'packages/react-relay/**/*.js'],
excludedFiles: [
'**/__tests__/**',

// The following files should eventually be migrated to not break this
// rule. Until then, we'll grandfather them in here.
// If anyone feels inspired, they can:
//
// 1. Remove a file from this list
// 2. Run `yarn lint`
// 3. Fix/supress all warnings
// 4. Open a PR
// 5. Profit?
'packages/react-relay/relay-hooks/readFragmentInternal.js',
'packages/react-relay/relay-hooks/useEntryPointLoader.js',
'packages/react-relay/relay-hooks/useFragmentInternal_CURRENT.js',
'packages/react-relay/relay-hooks/useFragmentInternal_EXPERIMENTAL.js',
'packages/react-relay/relay-hooks/useQueryLoader.js',
'packages/react-relay/relay-hooks/useQueryLoader_EXPERIMENTAL.js',
'packages/relay-runtime/handlers/connection/MutationHandlers.js',
'packages/relay-runtime/multi-actor-environment/MultiActorEnvironment.js',
'packages/relay-runtime/mutations/RelayDeclarativeMutationConfig.js',
'packages/relay-runtime/mutations/createUpdatableProxy.js',
'packages/relay-runtime/store/DataChecker.js',
'packages/relay-runtime/store/OperationExecutor.js',
'packages/relay-runtime/store/RelayErrorTrie.js',
'packages/relay-runtime/store/RelayExperimentalGraphResponseHandler.js',
'packages/relay-runtime/store/RelayExperimentalGraphResponseTransform.js',
'packages/relay-runtime/store/RelayModernStore.js',
'packages/relay-runtime/store/RelayOperationTracker.js',
'packages/relay-runtime/store/RelayRecordSource.js',
'packages/relay-runtime/store/RelayReferenceMarker.js',
'packages/relay-runtime/store/RelayResponseNormalizer.js',
'packages/relay-runtime/store/live-resolvers/LiveResolverCache.js',
'packages/relay-runtime/store/observeFragmentExperimental.js',
'packages/relay-runtime/util/RelayReplaySubject.js',
'packages/relay-runtime/util/getValueAtPath.js',
'packages/relay-runtime/util/handlePotentialSnapshotErrors.js',
],
rules: {
'relay-internal/no-for-of-loops': 'error',
},
},
],
};
11 changes: 1 addition & 10 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,8 @@
.*/node_modules/resolve/test/resolver/malformed_package_json/package.json

[options]
as_const=true
component_syntax=true
module.system=haste
module.system.haste.use_name_reducers=true
# get basename
module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1'
# strip .js or .js.flow suffix
module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1'

module.system.haste.paths.excludes=.*/__tests__/.*
module.system.haste.paths.excludes=.*/__mocks__/.*
Expand All @@ -21,10 +15,7 @@ module.system.haste.paths.includes=<PROJECT_ROOT>/node_modules/fbjs/lib/.*
munge_underscores=true
; https://fburl.com/code/h2jnts20 - to match internval value

suppress_type=$FlowIssue
suppress_type=$FlowFixMe
suppress_type=$FlowFixMeProps
suppress_type=$FlowFixMeState
suppress_type=$FlowExpectedError

format.bracket_spacing=false
Expand All @@ -42,4 +33,4 @@ untyped-import
untyped-type-import

[version]
^0.253.0
^0.278.0
4 changes: 4 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ following steps should work for all Relay packages:
1. Because of symbolic links and how Node resolves dependencies, you will probably want to instruct Node to resolve
preserve the links `yarn node --preserve-symlinks-main --preserve-symlinks ./node_modules/.bin/relay-compiler […]`.

## VSCode

This repository has configuration files in the `.vscode/` directory to make development in VSCode easier. This includes enumerating recommended exensions (Flow, Rust Analyzer, Prettier, etc.) and sensible default settings (enable auto formatting etc.) to use when developing in this repository as well as some defined [Tasks](https://code.visualstudio.com/docs/debugtest/tasks) to easily trigger common actions directly via the command pallet.

## License

By contributing to Relay, you agree that your contributions will be licensed under its MIT license.
47 changes: 28 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:
run:
working-directory: ./vscode-extension
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'yarn'
Expand All @@ -36,8 +36,8 @@ jobs:
matrix:
node-version: [18.x, 20.x]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
Expand All @@ -50,8 +50,8 @@ jobs:
name: JS Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'yarn'
Expand All @@ -68,8 +68,8 @@ jobs:
name: Flow Typecheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'yarn'
Expand All @@ -92,10 +92,13 @@ jobs:
os: windows-latest
runs-on: ${{ matrix.target.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.76.0
# Should stay in sync with fbcode/buck2/rust-toolchain
# And other similar references in this file and
# docusaurus.yml
toolchain: nightly-2025-05-09
override: true
- name: "Run tests"
run: cargo test --manifest-path=compiler/Cargo.toml --locked ${{ matrix.target.features && '--features' }} ${{ matrix.target.features }}
Expand All @@ -115,10 +118,13 @@ jobs:
# os: windows-latest
runs-on: ${{ matrix.target.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.76.0
# Should stay in sync with fbcode/buck2/rust-toolchain
# And other similar references in this file and
# docusaurus.yml
toolchain: nightly-2025-05-09
override: true
- name: "Update fixture tests"
run: ./scripts/update-fixtures.sh
Expand All @@ -133,11 +139,11 @@ jobs:
name: Rust Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
# Should stay in sync with tools/third-party/rustfmt/.rustfmt-version
toolchain: nightly-2024-07-28
toolchain: nightly-2025-04-14
override: true
components: rustfmt
- name: "rustfmt"
Expand Down Expand Up @@ -175,13 +181,16 @@ jobs:
artifact-name: relay-bin-win-x64
runs-on: ${{ matrix.target.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.76.0
# Should stay in sync with fbcode/buck2/rust-toolchain
# And other similar references in this file and
# docusaurus.yml
toolchain: nightly-2025-05-09
override: true
target: ${{ matrix.target.target }}
- uses: actions/setup-node@v2
- uses: actions/setup-node@v4
if: github.event_name == 'push' && github.repository == 'facebook/relay' && github.ref == 'refs/heads/main'
with:
node-version: 20.x
Expand Down Expand Up @@ -221,8 +230,8 @@ jobs:
if: github.event_name == 'push' && github.repository == 'facebook/relay'
needs: [js-tests, js-lint, typecheck, build-tests, build-compiler]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.x
registry-url: https://registry.npmjs.org/
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/docusaurus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,16 @@ jobs:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.76.0
# Should stay in sync with fbcode/buck2/rust-toolchain
# And other similar references in this file and
# ci.yml
# toolchain: nightly-2025-05-09

# Bug in rust causes wasm-pack to fail. Bug is fixed in
# https://github.com/rust-lang/rust/pull/139498 so we're temporarily
# ahead here while we wait for that fix to land in the common
# toolchain version used at Meta.
toolchain: nightly-2025-05-12
override: true
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/update-cargo-lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ jobs:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.76.0
# Should stay in sync with fbcode/buck2/rust-toolchain
# And other similar references in this file and
# ci.yml
toolchain: nightly-2025-05-09
override: true
- name: cargo check
run: cargo check --features vendored --manifest-path=compiler/Cargo.toml
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/vscode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
run:
working-directory: ./vscode-extension
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16.x
node-version: 20.x
cache: 'yarn'
- name: Install dependencies
run: yarn install --frozen-lockfile --ignore-scripts
Expand Down
14 changes: 14 additions & 0 deletions .prettier-plugins.fb.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/

module.exports = [
require.resolve(
'../../../../../../../tools/third-party/prettier/node_modules/prettier-plugin-hermes-parser/index.mjs',
),
];
25 changes: 25 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @oncall relay
*/

let plugins = ['prettier-plugin-hermes-parser'];
try {
plugins = require('./.prettier-plugins.fb.js');
} catch {}

module.exports = {
arrowParens: 'avoid',
bracketSameLine: true,
bracketSpacing: false,
requirePragma: true,
singleQuote: true,
trailingComma: 'all',
parser: 'hermes',
plugins,
};
43 changes: 43 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Run Rust Compiler Tests",
"type": "shell",
"command": "cargo test",
"options": {
"cwd": "${workspaceFolder}/compiler"
},
"problemMatcher": [
"$rustc"
]
},
{
"label": "Run Rust Compiler Tests (Update Snapshots)",
"type": "shell",
"command": "cargo test",
"options": {
"cwd": "${workspaceFolder}/compiler",
"env": {
"UPDATE_SNAPSHOTS": "1"
}
},
"problemMatcher": [
"$rustc"
]
},
{
"label": "Regenerate Rust Tests for Fixture Files",
"type": "shell",
"command": "./scripts/update-fixtures.sh",
"problemMatcher": [
"$rustc"
]
},
{
"label": "Build Relay artifacts for runtime tests",
"type": "shell",
"command": "./scripts/compile-tests.sh"
}
]
}
Loading
Loading