prisma-archive / graphql-transform-schema Goto Github PK
View Code? Open in Web Editor NEWTransform, filter & alias resolvers of a GraphQL schema
Home Page: https://example-rakllksfme.now.sh/graphiql
Transform, filter & alias resolvers of a GraphQL schema
Home Page: https://example-rakllksfme.now.sh/graphiql
source/Schema/index.ts:14:43 - error TS2345: Argument of type 'import("/Users/jasonkuhrt/projects/personal/gql-examples/prisma-stitch/node_modules/@types/graphq...' is not assignable to parameter of type 'import("/Users/jasonkuhrt/projects/personal/gql-examples/prisma-stitch/node_modules/apollo-link/n...'.
Types of property 'astNode' are incompatible.
Type 'Maybe<SchemaDefinitionNode>' is not assignable to type 'SchemaDefinitionNode | undefined'.
Type 'null' is not assignable to type 'SchemaDefinitionNode | undefined'.
14 const transformedSchema = transformSchema(schema, {})
~~~~~~
Guessing the issue here might be that my graphql-tools
is not compatible with the current version of graphql-transform-schema
.
The same field name might be used on two different root fields, so you need to be able to only filter out one of them.
Hi!
consider following schema:
type BoxImage implements ContentBox {
id: String
image: String
}
interface ContentBox{
id: String
}
type Query {
contentBoxById(id: String): ContentBox
}
Type BoxImage is valid return type for contentBoxById but it is removed from transformed schema:
transformSchema(remoteSchema, {
Query: {
'*': false,
contentBoxById: true
}
}
Many thanks and keep it up! :)
As mentioned in the schema transformation documentation, one can hide operations in a transformSchema
call by setting boolean values against desired queries/mutations like so:
// Example below is from the documentation
const schema = ... // this is the GraphQLSchema instance implementing the SDL from above
const transformedSchema = transformSchema(schema, {
Query: {
'allUsers': false // hide `allUsers` field on `Query` type
},
Mutation: {
'deleteUser': false // hide `deleteUser` field on `Mutation` type
}
})
However, there may be situations where you'd want to conditionally hide one query/mutation or another. This functionality could be provided by functions, but I'm still on the fence how, especially when functions are used to modify arguments before they hit a resolve (so how could you tell a "hiding" function from a "modifying" function?). I still feel this could be a good feature.
See apollographql/apollo-server#643 for more details.
4.17.10
to 4.17.11
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
lodash is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
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.