-
-
Notifications
You must be signed in to change notification settings - Fork 816
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VisitableSchemaType is no longer exported #837
Labels
Comments
ghost
added
the
good first issue
label
Jun 9, 2018
Because of this problem, we're having trouble when writing tests for our directive.
Ends up:
Ok, let's add the constructor:
Output this time:
Please make the constructor public and also export VisitableSchemaType otherwise it is problematic to create an instance of a directive in typescript. |
@alvis I'm happy to pick this up if you're still looking to get this fixed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Due to 51d2ccf,
VisitableSchemaType
is no longer exported from index.ts. While it is not a problem for js users, it introduces an issue for typescript users.The problem is that the constructor function of
SchemaDirectiveVisitor
takes aVisitableSchemaType
as followhttps://github.com/apollographql/graphql-tools/blob/248527d497aa1fe5ff5648e94bf38366121d9d92/src/schemaVisitor.ts#L668-L674
This lead to an extra
import { VisitableSchemaType } from 'graphql-tools/dist/schemaVisitor';
for users who use SchemaDirectiveVisitor with typescript.A simple fix is to re-export
VisitableSchemaType
. But a better fix is to create an interface for theconfig
variable and export it.The text was updated successfully, but these errors were encountered: