0.0.120 • Published 3 years ago

@zaibot/graphql-cosmos v0.0.120

Weekly downloads
320
License
MIT
Repository
github
Last release
3 years ago

graphql-cosmos

Concept

@cosmos(container, ours, theirs)

The container argument indicates the value of the field is stored in a different Cosmos Container

The ours argument tells the resolver that this entity owns the information and specifies what underlying column to use. Combined with container this indicates the relational ID column.

The theirs argument tells the resolver that the relational information is owned by an entity in the container Cosmos Container.

Pseudo code:

Person {
    id
    name
    preferredContactId?
}

Contact {
    id
    personId
    phonenumber
}
type Query {
  people: [Person!]! @cosmos
}

type Person @cosmos(database: "AddressBook", container: "Persons") {
  id: ID
  name: String!
  contacts: [Contact!]! @cosmos(theirs: "personId")
  perferredContact: Contact @cosmos(ours: "preferredContactId")
}

type Contact @cosmos(database: "AddressBook", container: "Contacts") {
  person: Person! @cosmos(ours: "personId")
  preferredBy: [Person!]! @cosmos(theirs: "preferredContactId")
  phonenumber: String!
}
0.0.119

3 years ago

0.0.118

3 years ago

0.0.120

3 years ago

0.0.114

3 years ago

0.0.102

3 years ago

0.0.101

3 years ago

0.0.100

3 years ago

0.0.39

3 years ago

0.0.38

3 years ago

0.0.37

3 years ago

0.0.36

3 years ago

0.0.32

3 years ago

0.0.33

3 years ago

0.0.34

3 years ago

0.0.35

3 years ago

0.0.30

3 years ago

0.0.31

3 years ago

0.0.28

4 years ago

0.0.27

4 years ago

0.0.26

4 years ago

0.0.24

4 years ago

0.0.25

4 years ago

0.0.22

4 years ago

0.0.23

4 years ago

0.0.21

4 years ago

0.0.20

4 years ago

0.0.19

4 years ago

0.0.17

4 years ago

0.0.18

4 years ago

0.0.13

4 years ago

0.0.14

4 years ago

0.0.11

4 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.5

4 years ago

0.0.6

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago

0.0.0

4 years ago