Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8,091 changes: 1,067 additions & 7,024 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"name": "root",
"private": true,
"workspaces": ["packages/*"],
"workspaces": [
"packages/*"
],
"devDependencies": {
"@types/chrome": "^0.0.128",
"@types/jest": "^26.0.21"
Expand Down
2 changes: 1 addition & 1 deletion packages/graphql-lowcode/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
node_modules
node_module
11 changes: 8 additions & 3 deletions packages/graphql-lowcode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,16 @@
"test": "yarn jest"
},
"devDependencies": {
"@types/jest": "^26.0.23",
"@types/jest": "^26.0.24",
"graphql": "^15.5.1",
"jest": "^27.0.5",
"jest": "^27.0.6",
"ts-jest": "^27.0.3",
"ts-node": "^10.0.0",
"typescript": "^4.3.4"
"typescript": "^4.3.5"
},
"dependencies": {
"@types/node": "^16.4.0",
"@types/react": "^17.0.14",
"@types/react-dom": "^17.0.9"
}
}
3 changes: 2 additions & 1 deletion packages/templates/react-urql-graphql-codegen/.env
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
REACT_APP_SCHEMA_ENDPOINT = "https://iteria-app-example01.herokuapp.com/v1/graphql"
REACT_APP_SCHEMA_ENDPOINT = "https://iteria-app-example01.herokuapp.com/v1/graphql"
SKIP_PREFLIGHT_CHECK=true
2 changes: 1 addition & 1 deletion packages/templates/react-urql-graphql-codegen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@material-ui/core": "^4.12.2",
"dotenv": "^10.0.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
Expand Down Expand Up @@ -52,6 +53,5 @@
"list-files": "^1.1.4",
"path": "^0.12.7",
"web-vitals": "^1.0.1"

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,28 @@ import Fetching from './Fetching'
import Error from './Error'
import ListPlaceholder from './ListPlaceholder'

function App() {
export default function App() {
const [result] = useGeneratedQuery({
variables: {}
})

const { fetching, error, data } = result
if (fetching) return <Fetching />;
if (error) return <Error error={error} />;

if (fetching) return (
<div className="Cage">
<Fetching />
</div>
);

if (error) return (
<div className="Cage">
<Error error={error} />
</div>
);

return (
<ListPlaceholder customers={data?.customers} />
<div className="Cage">
<ListPlaceholder customers={ data?.customers } />
</div>
);
}

export default App;
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ interface IError {
const Error: React.FC<IError> = ({ error }) => {

return (
<>
<div>
{error}
</>
</div>
)
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React from 'react';

const Fetching: React.FC = ({ }) => {
const Fetching: React.FC = () => {

return (
<>
<div>
fetching
</>
)
</div>
);
}

export default Fetching
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
import React from 'react';
import internal from 'stream';
import { Customer } from '../generated';
import SimpleCard from './Simplecard';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

please, prefer named imports


interface ICustomers {
customers: Customer[] | undefined
}
const ListPlaceholder: React.FC<ICustomers> = ({ customers }) => {
return (
<>
<div>
{
customers?.map((customer) => (
<p key={customer.id}>{customer.name}</p>
// customer.id; customer.name
<p key={customer.id}>{SimpleCard(customer.id, customer.name)}</p>
))
}
</>


</div>
)
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import Card from '@material-ui/core/Card';
import CardActions from '@material-ui/core/CardActions';
import CardContent from '@material-ui/core/CardContent';
import Button from '@material-ui/core/Button';
import Typography from '@material-ui/core/Typography';

const useStyles = makeStyles({
root: {
minWidth: 275,
},
bullet: {
display: 'inline-block',
margin: '0 2px',
transform: 'scale(0.8)',
},
title: {
fontSize: 14,
},
pos: {
marginBottom: 12,
},
});

export default function SimpleCard(customer_id: number, customer_name: string) {
const classes = useStyles();
const bull = <span className={classes.bullet}>•</span>;

return (
<Card className={classes.root}>
<CardContent>
<Typography variant="h5" component="h2">
{customer_name}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

please check the issue there is title and subheader

</Typography>
<Typography className={classes.pos} color="textSecondary">
{customer_id}
</Typography>
</CardContent>
</Card>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ query generated {
createdAt
avatarUrl
address
seq
}
}