I have a question about managing schema progression over time, especially working with different versions of native mobile apps.
Say an initial implementation of apollo graphql might start off with a schema that has a type ‘payee’ :
type Payee {
payeeId : String!
name : String!
bsb : String!
accountNo : String!
}
v1 of a mobile app might have a query like
query {
me {
payees {
payeeId
name
bsb
accountNo
}
}
}
Later on, if we change the schema to change the Type to an Interface, would the query in v1 of my mobile app break? or continue working as it originally did
interface Payee {
payeeId : String!
name : String!
bsb : String!
accountNo : String!
}
type AccountPayee implements Payee {
payeeId : String!
name : String!
bsb : String!
accountNo : String!
}
Would the v1 query continue working while v2 query like this also work at same time? (and potentially having different resolvers for bsb and accountNo if i want) :
query {
me {
payees {
payeeId
name
...on AccountPayee {
bsb
accountNo
}
}
}
}