-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Reviewed By: captbaritone Differential Revision: D58704612 fbshipit-source-id: b24944267f1a9c2b1dccf56165a31250e3133d7d
- Loading branch information
1 parent
c632b4e
commit 73e1116
Showing
6 changed files
with
211 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
102 changes: 102 additions & 0 deletions
102
...ay_compiler_integration/fixtures/semantic_null_require_bubble_to_required_parent.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
==================================== INPUT ==================================== | ||
//- PersonComponent.js | ||
graphql`fragment PersonComponentFragment on Query @throwOnFieldError { | ||
some_person @required(action: LOG) { | ||
name @required(action: LOG) | ||
} | ||
}` | ||
|
||
//- relay.config.json | ||
{ | ||
"language": "flow", | ||
"jsModuleFormat": "haste", | ||
"schema": "schema.graphql", | ||
"experimentalEmitSemanticNullabilityTypes": true | ||
} | ||
|
||
//- schema.graphql | ||
type Query { | ||
some_person: Person @semanticNonNull | ||
} | ||
|
||
|
||
type Person { | ||
name: String | ||
} | ||
==================================== OUTPUT =================================== | ||
//- __generated__/PersonComponentFragment.graphql.js | ||
/** | ||
* <auto-generated> SignedSource<<fb5e66f956e0ae6de1169a4ef911454e>> | ||
* @flow | ||
* @lightSyntaxTransform | ||
* @nogrep | ||
*/ | ||
|
||
/* eslint-disable */ | ||
|
||
'use strict'; | ||
|
||
/*:: | ||
import type { Fragment, ReaderFragment } from 'relay-runtime'; | ||
import type { FragmentType } from "relay-runtime"; | ||
declare export opaque type PersonComponentFragment$fragmentType: FragmentType; | ||
export type PersonComponentFragment$data = ?{| | ||
+some_person: {| | ||
+name: string, | ||
|}, | ||
+$fragmentType: PersonComponentFragment$fragmentType, | ||
|}; | ||
export type PersonComponentFragment$key = { | ||
+$data?: PersonComponentFragment$data, | ||
+$fragmentSpreads: PersonComponentFragment$fragmentType, | ||
... | ||
}; | ||
*/ | ||
|
||
var node/*: ReaderFragment*/ = { | ||
"argumentDefinitions": [], | ||
"kind": "Fragment", | ||
"metadata": { | ||
"throwOnFieldError": true | ||
}, | ||
"name": "PersonComponentFragment", | ||
"selections": [ | ||
{ | ||
"kind": "RequiredField", | ||
"field": { | ||
"alias": null, | ||
"args": null, | ||
"concreteType": "Person", | ||
"kind": "LinkedField", | ||
"name": "some_person", | ||
"plural": false, | ||
"selections": [ | ||
{ | ||
"kind": "RequiredField", | ||
"field": { | ||
"alias": null, | ||
"args": null, | ||
"kind": "ScalarField", | ||
"name": "name", | ||
"storageKey": null | ||
}, | ||
"action": "LOG", | ||
"path": "some_person.name" | ||
} | ||
], | ||
"storageKey": null | ||
}, | ||
"action": "LOG", | ||
"path": "some_person" | ||
} | ||
], | ||
"type": "Query", | ||
"abstractKey": null | ||
}; | ||
|
||
(node/*: any*/).hash = "98e50ccb4d4bee0618374c55c0a2c4a8"; | ||
|
||
module.exports = ((node/*: any*/)/*: Fragment< | ||
PersonComponentFragment$fragmentType, | ||
PersonComponentFragment$data, | ||
>*/); |
24 changes: 24 additions & 0 deletions
24
...relay_compiler_integration/fixtures/semantic_null_require_bubble_to_required_parent.input
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
//- PersonComponent.js | ||
graphql`fragment PersonComponentFragment on Query @throwOnFieldError { | ||
some_person @required(action: LOG) { | ||
name @required(action: LOG) | ||
} | ||
}` | ||
|
||
//- relay.config.json | ||
{ | ||
"language": "flow", | ||
"jsModuleFormat": "haste", | ||
"schema": "schema.graphql", | ||
"experimentalEmitSemanticNullabilityTypes": true | ||
} | ||
|
||
//- schema.graphql | ||
type Query { | ||
some_person: Person @semanticNonNull | ||
} | ||
|
||
|
||
type Person { | ||
name: String | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters