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.

Failing to extend

See original GitHub issue

First of all - awesome project!

I wish to extend my project graphql api, add additional types, and test the client. Im not sure I understand how extend works here.

First of all I was following the gif animation in the readme, I’ve extended github api, and I have the following in the schema just like in that gif

extend type User {
  petImage: String @fake(type:imageUrl, options: { imageCategory:cats })
}

once I try to save, it prompts me with “Must provide schema definition with query type or a type named Query.”

So I thought to add a Query type

extend type User {
  petImage: String @fake(type:imageUrl, options: { imageCategory:cats })
}


type Query {
  user: User
}

then it fails to save again and prompts me with “Type “User” not found in document.”

What am I missing here?

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
IvanGoncharovcommented, Jul 13, 2017

@sergelerner Strange, I can’t reproduce this issue. You don’t need to add type Query so your first sample is perfectly valid one.

Can you please provide version of graphql-faker package:

npm list -g --depth=0 | grep graphql-faker

Also please specify CLI command your use to run faker, but don’t forget to replace your Authorization token.

Can you please create file test.graphql with following content:

extend type User {
  petImage: String @fake(type:imageUrl, options: { imageCategory:cats })
}

And than run these command with your GitHub token:

graphql-faker --extend https://api.github.com/graphql -H "Authorization: bearer <YOUR_TOKEN>" test.graphql
0reactions
sergelernercommented, Jul 17, 2017

@IvanGoncharov Yes, thank you! : )

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failure to Extend Definition | Law Insider
Failure to Extend means notification of Employee by the Corporation that it does not desire to extend the Agreement Term (or the term...
Read more >
DiskPart Failed to Extend the Volume| Solve it Quickly!
This article aims to tell why DiskPart failed to extend the Volume and how to quickly get rid of this issue in Windows...
Read more >
How to Fix "Diskpart Failed to Extend the Volume" Error in 2022
This article explains why Diskpart failed to extend the volume and provides detailed guides for readers to fix this error.
Read more >
[Solved] Unable to extend C drive in Windows 10 computer
This page explains why Disk Management is unable to extend c drive in Windows 10/8/7 and what to do when you are unable...
Read more >
I've tried to extend volume but it failed.
Hi, I have tried to extend the volume to c: , but it seems invalid. I've also tried diskpart command ,but it seems...
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