Skip to content
This repository was archived by the owner on Dec 18, 2025. It is now read-only.

Commit 303a9d5

Browse files
authored
Merge pull request #8 from contentstack/development
GraphQL beta ph2
2 parents 4d8ce96 + a1b1f2a commit 303a9d5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+16051
-8758
lines changed

.babelrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

.eslintrc.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
root: true,
3+
extends: '@react-native-community',
4+
};

.flowconfig

Lines changed: 39 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -5,66 +5,69 @@
55
; Ignore "BUCK" generated dirs
66
<PROJECT_ROOT>/\.buckd/
77

8-
; Ignore unexpected extra "@providesModule"
9-
.*/node_modules/.*/node_modules/fbjs/.*
8+
; Ignore polyfills
9+
node_modules/react-native/Libraries/polyfills/.*
1010

11-
; Ignore duplicate module providers
12-
; For RN Apps installed via npm, "Libraries" folder is inside
13-
; "node_modules/react-native" but in the source repo it is in the root
14-
.*/Libraries/react-native/React.js
11+
; These should not be required directly
12+
; require from fbjs/lib instead: require('fbjs/lib/warning')
13+
node_modules/warning/.*
1514

16-
; Ignore polyfills
17-
.*/Libraries/polyfills/.*
15+
; Flow doesn't support platforms
16+
.*/Libraries/Utilities/LoadingView.js
1817

19-
; Ignore metro
20-
.*/node_modules/metro/.*
18+
[untyped]
19+
.*/node_modules/@react-native-community/cli/.*/.*
2120

2221
[include]
2322

2423
[libs]
25-
node_modules/react-native/Libraries/react-native/react-native-interface.js
24+
node_modules/react-native/interface.js
2625
node_modules/react-native/flow/
27-
node_modules/react-native/flow-github/
2826

2927
[options]
3028
emoji=true
3129

3230
esproposal.optional_chaining=enable
3331
esproposal.nullish_coalescing=enable
3432

35-
module.system=haste
36-
module.system.haste.use_name_reducers=true
37-
# get basename
38-
module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1'
39-
# strip .js or .js.flow suffix
40-
module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1'
41-
# strip .ios suffix
42-
module.system.haste.name_reducers='^\(.*\)\.ios$' -> '\1'
43-
module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1'
44-
module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1'
45-
module.system.haste.paths.blacklist=.*/__tests__/.*
46-
module.system.haste.paths.blacklist=.*/__mocks__/.*
47-
module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/Animated/src/polyfills/.*
48-
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/Libraries/.*
33+
module.file_ext=.js
34+
module.file_ext=.json
35+
module.file_ext=.ios.js
4936

5037
munge_underscores=true
5138

52-
module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
53-
54-
module.file_ext=.js
55-
module.file_ext=.jsx
56-
module.file_ext=.json
57-
module.file_ext=.native.js
39+
module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/node_modules/react-native/\1'
40+
module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '<PROJECT_ROOT>/node_modules/react-native/Libraries/Image/RelativeImageStub'
5841

5942
suppress_type=$FlowIssue
6043
suppress_type=$FlowFixMe
6144
suppress_type=$FlowFixMeProps
6245
suppress_type=$FlowFixMeState
6346

64-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
65-
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
66-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
47+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
48+
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+
6749
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
6850

51+
[lints]
52+
sketchy-null-number=warn
53+
sketchy-null-mixed=warn
54+
sketchy-number=warn
55+
untyped-type-import=warn
56+
nonstrict-import=warn
57+
deprecated-type=warn
58+
unsafe-getters-setters=warn
59+
unnecessary-invariant=warn
60+
signature-verification-failure=warn
61+
deprecated-utility=error
62+
63+
[strict]
64+
deprecated-type
65+
nonstrict-import
66+
sketchy-null
67+
unclear-type
68+
unsafe-getters-setters
69+
untyped-import
70+
untyped-type-import
71+
6972
[version]
70-
^0.78.0
73+
^0.122.0

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ build/
2929
.gradle
3030
local.properties
3131
*.iml
32-
32+
*/Pods
3333
# node.js
3434
#
3535
node_modules/

.prettierrc.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
bracketSpacing: false,
3+
jsxBracketSameLine: true,
4+
singleQuote: true,
5+
trailingComma: 'all',
6+
};

.vscode/launch.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@
44
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
55
"version": "0.2.0",
66
"configurations": [
7+
{
8+
"name": "Debug iOS",
9+
"cwd": "${workspaceFolder}",
10+
"type": "reactnative",
11+
"request": "launch",
12+
"platform": "ios"
13+
},
714
{
815
"type": "node",
916
"request": "launch",

App.js

Lines changed: 15 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -3,65 +3,36 @@
33
* https://github.com/facebook/react-native
44
*
55
* @format
6-
* @flow
6+
* @flow strict-local
77
*/
88

99
import React, {Component} from 'react';
10-
import {Platform, StyleSheet, Text, View} from 'react-native';
11-
import {Scene, Router, ActionConst, Stack, Modal, Tabs, Actions} from 'react-native-router-flux';
12-
10+
import {Router, Scene} from 'react-native-router-flux';
1311
import apolloClient from './apollo';
14-
import {ApolloProvider} from 'react-apollo'
15-
import ListView from './ListView';
12+
import {ApolloProvider} from 'react-apollo';
1613
import Products from './Products';
1714

18-
type Props = {};
19-
export default class App extends Component<Props> {
15+
class App extends Component {
2016
state = {
21-
client: null
22-
}
17+
client: apolloClient(),
18+
};
2319

24-
componentDidMount () {
25-
const client = apolloClient();
26-
this.setState({
27-
client
28-
})
29-
}
3020
render() {
31-
if (this.state.client == null) {
32-
return (<View style={styles.container}>
33-
<Text style={styles.welcome}>Welcome to React Native!</Text>
34-
</View>);
35-
}
3621
return (
37-
<ApolloProvider client = {this.state.client}>
22+
<ApolloProvider client={this.state.client}>
3823
<Router>
39-
<Scene key = 'root' navigationBarStyle={{backgroundColor: "#e34950"}}>
40-
<Scene key = 'Products'
41-
component = {Products}
42-
title = 'Products'/>
24+
<Scene key="root">
25+
<Scene
26+
key="Products"
27+
component={Products}
28+
title="Products"
29+
initial={true}
30+
/>
4331
</Scene>
4432
</Router>
4533
</ApolloProvider>
4634
);
4735
}
4836
}
4937

50-
const styles = StyleSheet.create({
51-
container: {
52-
flex: 1,
53-
justifyContent: 'center',
54-
alignItems: 'center',
55-
backgroundColor: '#F5FCFF',
56-
},
57-
welcome: {
58-
fontSize: 20,
59-
textAlign: 'center',
60-
margin: 10,
61-
},
62-
instructions: {
63-
textAlign: 'center',
64-
color: '#333333',
65-
marginBottom: 5,
66-
},
67-
});
38+
export default App;

ListView.js

Lines changed: 0 additions & 121 deletions
This file was deleted.

0 commit comments

Comments
 (0)