Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

WIP: generated relationship details for schema #899

Merged
merged 24 commits into from
Nov 23, 2020
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
f077c3a
fix: add relationship dets. to schema
kingsleyzissou Oct 12, 2020
68fc50f
fix: lint issues
kingsleyzissou Oct 14, 2020
0f0e05f
fix: update snapshot
kingsleyzissou Oct 14, 2020
0d47969
test: add test to check if manyToOne relationship is added (#900)
Oct 14, 2020
593eee5
fix: update snapshots
kingsleyzissou Oct 15, 2020
d218ecc
fix: relationship filtering
kingsleyzissou Oct 15, 2020
bc236fa
test: add more tests
kingsleyzissou Oct 15, 2020
78b13ec
chore: remove commented code
kingsleyzissou Oct 15, 2020
d3e33eb
chore: add indentation dep
kingsleyzissou Oct 15, 2020
501705a
chore: add datasync types to json schema
kingsleyzissou Oct 15, 2020
a3b8ef4
chore: refactor createModelType to use jsonSchema
kingsleyzissou Oct 15, 2020
c5521c3
chore: clean up generated code indentation
kingsleyzissou Oct 15, 2020
76b392b
fix: remove unused method
kingsleyzissou Oct 15, 2020
2d0f1b1
fix: fix indentation of generated index file
kingsleyzissou Oct 15, 2020
a27ffa4
chore: add code comments
kingsleyzissou Oct 15, 2020
a8c9772
fix: lint issues
kingsleyzissou Oct 15, 2020
af7ad8a
fix: update snapshots
kingsleyzissou Oct 15, 2020
c681070
fix: add missing dep
kingsleyzissou Oct 15, 2020
7ad987b
chore: remove deleted field from json schema
kingsleyzissou Oct 15, 2020
7fbe7f8
fix: update CLI snapshots
kingsleyzissou Oct 19, 2020
2c851d6
chore: create snapshots for json schema
kingsleyzissou Oct 19, 2020
015df2a
fix: remove datasync filter
kingsleyzissou Oct 22, 2020
500bc29
fix: lint issues
kingsleyzissou Oct 22, 2020
fcef636
fix: breaking snapshots
kingsleyzissou Oct 22, 2020
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
Prev Previous commit
Next Next commit
fix: remove unused method
  • Loading branch information
kingsleyzissou committed Nov 23, 2020
commit 76b392bee7c38de725d0480298fab3fb2b5a55d7
11 changes: 0 additions & 11 deletions packages/datastore/cli/src/generate-documents/createModelTypes.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
import { GraphQLOutputType, isNonNullType, getNullableType } from "graphql";
import endent from "endent";

const getField = (fieldName: string, type: GraphQLOutputType) => {
if (isNonNullType(type)) {
type = getNullableType(type);
} else {
fieldName = `${fieldName}?`;
}

return `${fieldName}: ${type}`;
};

const getModelProperties = (schema: any) => {
const fieldMap = schema.properties;
const keys = Object.keys(fieldMap);
Expand Down