question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Array syntax for typeDefs argument not supported

See original GitHub issue

I’m working on migrating an apollo graphql server to graphql-yoga, I’m strugling with modularizing schemas. like described HERE.

I know it’s possible to keep using new GraphQLServer passing a GraphQLSchema instead of passing typeDefs and resolvers.

I’m following same approach as above I’m getting this: if (typeDefs.endsWith('graphql')) { image

Is there a way to modularize typeDefs without instantiating GraphQLSchema and passing it to GraphQLServer?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
eduardomoronicommented, Feb 22, 2018

I know that using graphql-import is better than using another modularize approach. But if you want to help people to join graphql-yoga things should be more intuitive. I think that accepting graphql-tools’ way of modularizing schema will make yoga friendlier

2reactions
kbrandwijkcommented, Feb 22, 2018

The best way to modularize your schemas is by using graphql-import. You can split your schema into as many different files as you want that way, and import them into your final schema.

Also, you can pass both a string and a filename to typeDefs, so if you are using graphql-import, you can just pass in the filename to that schema file.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Array syntax for typeDefs argument not supported #185 - GitHub
I'm working on migrating an apollo graphql server to graphql-yoga, I'm strugling with modularizing schemas. like described HERE.
Read more >
array of function pointers with/out typedef and explicit ...
I wonder about the fact that is possible to omit the argument(s) for the array of function pointers. Again, if I write typedef2...
Read more >
Passing Arrays as Function Arguments in C - Tutorialspoint
If you want to pass a single-dimension array as an argument in a function, you would have to declare a formal parameter in...
Read more >
Array declaration - cppreference.com
An array type and its element type are always considered to be identically qualified, except that an array type is never considered to...
Read more >
JSDoc Reference - TypeScript: Documentation
You can specify map-like and array-like objects using string and number index signatures, using either standard JSDoc syntax or TypeScript syntax.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found