Question. What would the [graphql-js starwars sche...
# prisma-whats-new
i
Question. What would the [graphql-js starwars schema](https://github.com/graphql/graphql-js/blob/master/src/__tests__/starWarsSchema.js) example look like in IDL? Is there an example of that anywhere?
a
@idkjsx It's hard to make a 1-on-1 translation to Graphcool, because of the lack of interface support
i
@agartha so IDL is a graphcool specific thing?
a
No, IDL isn't, but not all features are supported on this platform, that's what I meant
i
I mean, its just data so there is a way to implement it, right?
i
run that through graphcool push and you get this `There are issues with the new schema: ✖ The relation field
friends
must specify a
@relation
directive:
@relation(name: "MyRelation")
✖ The relation field
friends
has the type
[Character!]
. But the other directive for this relation appeared on the type
Droid
✖ The relation field
friends
has the type
[Character!]
. But the other directive for this relation appeared on the type
Human
`
a
Yes, that's why I said that it's not 1-on-1 compatible with graphcool
i
so it needs some tweeking. Im just trying to figure what kind of tweeks make sense for graphcool
a
Remove the interface, specify relation attributes on the relations
Create a seperate type for Character, with the appearsIn field, a 1-1 relation to Droid, and a 1-1 relation to Human
Enums can't be JSON, but only single strings
i
So interfaces are not supported?
a
Not yet
i
cool
a
There's a FR for it though
i
trying your sug now
a
Then not all queries can be implemented 1-on-1 because of the lack of interface, so you need some creative filtering in your queries to achieve more or less the same result
Then the custom top level queries are also not supported, especially the hero query
So that's needs to be rewritten as a query on Character
i
ok.
where can I see what features are supported?
lots of refactoring there, project for another time. Just trying to see how easy it is to convert one to the other.
Thanks
What is the best info you all have on complex schemas on graphcool that i might read up on?