Skip to content

v0.6.0 breaks import functionality (working in v0.5.2) #180

@tsukhu

Description

@tsukhu

I upgraded the nxplorerJS project to v0.6.0 and got the following error

Syntax Error: Unexpected <EOF>
    
    GraphQL request (2:1)
    1: 
    2: 
       ^
      22 | // Create GraphQL Schema with all the pieces in place 
      23 | export const setupSchema = (): GraphQLSchema => {
    > 24 |   const schema = makeExecutableSchema({
      25 |     typeDefs,
      26 |     resolvers: resolvers,
      27 |     schemaDirectives: {

Here is the travis build reference https://travis-ci.org/ERS-HCL/nxplorerjs-microservice-starter/jobs/382177481

This appears to be related to #45 but when I added a dummy type the wildcard imports do not get imported properly

Code snippet

const typeDefs = importSchema('server/graphql/schema/main.graphql');
...
export const setupSchema = (): GraphQLSchema => {
		  const schema = makeExecutableSchema({
			typeDefs,
			resolvers: resolvers,
			schemaDirectives: {
			  date: FormattableDateDirective,
			  auth: AuthDirective
			}
		});

main.graphql

# import * from "./starwars.graphql"
# import * from "./example.graphql"
# import * from "./user.graphql"
# import * from "./movie.graphql"
# import * from "./blog.graphql"
# import * from "./schema.graphql"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions