nicolaslopezj / graphql-loader Goto Github PK
View Code? Open in Web Editor NEWA ecosystem for package authors to inject schemas to apollo apps
License: MIT License
A ecosystem for package authors to inject schemas to apollo apps
License: MIT License
from the documentation, its unclear that typeDefs has to be an array of strings, instead of a string.
This fails silently.
allow typeDefs to be a string or highlight it in the readme
If a union type exists in the typeDefs, it is not parsed and made available in the resulting schema.
http://graphql.org/learn/schema/#union-types
Example typeDefs:
type TextActivity {
title
text
}
type VideoActivity {
title
video
}
union Activity = TextActivity | VideoActivity
Result when building AST Schema: Error: Type "Activity" not found in document.
Even commented type declarations are parsed, e.g.
## Color it is
# type Color {
# name: String
# hex: String
# red: Int
# green: Int
# blue: Int
# }
# Shape it is
type Shape {
name: String
area: Float
}
both of these type will be parsed by graphql-loader.
If I have a definition like this:
interface Magic {
foo: String
}
interface Trick {
bar: int
}
type User implements Magic, Trick {
foo: String
bar: int
}
and I parse it with graphql-loader
, it gets mangled like this:
interface Magic {
foo: String
}
interface Trick {
bar: int
}
Trick {
foo: String
bar: int
}
... which is (of couse) invalid GraphQL, and so calling makeExecutableSchema()
on it will fail with a parse error.
If I have a type like this:
type FromMe2You {
message: String
}
and process it with graphql-loader
, it will be maimed into this:
You {
message: String
}
The reason for this is that it doesn't like the number in the name of the type.
I am not exactly sure what the specs say here, but the GraphQL parser itself has no problem with the number, so I see no reason why should it be forbidden...
# Color it is
type Color {
name: String
hex: String
red: Int
green: Int
blue: Int
}
if you do loadSchema, then getSchema, comment is gone. And that leads to introspection queries not returning a description for the type.
Hello,
You allows to split schemas/resolvers in different files however we cannot define more than one Query
otherwise the error Error: Must provide only one query type in schema
is thrown. See apollographql/apollo-server#43 to find solutions to merge queries into a single one.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.