Use in conjunction with graphql-tools?
Opened this issue · 0 comments
grahamb commented
graphql-relay-tools
is a "library that allows the easy creation of Relay compliant servers using the GraphQL type language", used in conjunction with graphql-tools
. It provides helper functions for dealing with Relay connections, object identification, etc.
graphql-relay-tools & graphql-tools both assume that you're defining your types, etc using JavaScript templated strings, and uses interpolation to call its functions. For example,
const factionType = `
type Faction {
ships${connectionArgs()}: ShipConnection
}
`;
… would result in the following GraphQL type:
type Faction {
ships(
first: Int,
after: String,
last: Int,
before: String
)
}: ShipConnection
Right now, I can't see a way to use this pattern with static .graphql
files and graphql-import
. Am I missing something? If not, is this something that would be considered as an addition to the library?