Forum Discussion
Hi Udayadeepthi ,
have you only tried to import that single graphql file?
I've pasted a sample graphql schema. Can you put that in to a .graphql file and see if it imports correctly? If so, you can compare your schema against it and see if there are any major differences. That might be a good starting point
schema {
query: Query
}
type Tweet {
id: ID!
# The tweet text. No more than 140 characters!
body: String
# When the tweet was published
date: Date
# Who published the tweet
Author: User
# Views, retweets, likes, etc
Stats: Stat
}
type User {
id: ID!
username: String
first_name: String
last_name: String
full_name: String
name: String @deprecated
avatar_url: Url
}
type Stat {
views: Int
likes: Int
retweets: Int
responses: Int
}
type Notification {
id: ID
date: Date
type: String
}
type Meta {
count: Int
}
scalar Url
scalar Date
type Query {
Tweet(id: ID!): Tweet
Tweets(limit: Int, skip: Int, sort_field: String, sort_order: String): [Tweet]
TweetsMeta: Meta
User(id: ID!): User
Notifications(limit: Int): [Notification]
NotificationsMeta: Meta
}
type Mutation {
createTweet (
body: String
😞 Tweet
deleteTweet(id: ID!): Tweet
markTweetRead(id: ID!): Boolean
}
I've tried this sample format it gives me error saying syntax error at deleteTweet and markTweetRead both places.
- MConneely3 years agoStaff
Udayadeepthi I cannot upload a .graphql file directly, but ive attached it as a text file so you could try downloading and coverting to a .graphql file.
I've imported it on version 3.30.0. What ReadyAPI verison are you using? Have you a sample that you have been testing with that you want to share?- Gargi3 years agoNew Contributor
Hi,
I am also using Ready API version 3.30.0 and trying to import graphql file from my computer saved as .graphql but getting this error :
errors=[InvalidSyntaxError{ message=Invalid Syntax
I've also given endpoint as https://URL/graphql
Could any one please help. Thanks
- Udayadeepthi3 years agoOccasional Contributor
I'm using readyAPI 3.20.0 version
- Udayadeepthi3 years agoOccasional Contributor
I'm able to import now graphql schema by adding below to my .graphql file. This was helped by one of tech(Jonathan) from smartbear.
schema {
query: Query
mutation: Mutation
}
- juanneumann723 years agoNew Contributor
Texas Benefits wrote:
I've tried this sample format it gives me error saying syntax error at deleteTweet and markTweetRead both places.
Yes, I agree with you.
Related Content
- 4 months ago
- 2 years ago
- 6 years ago
- 2 years ago
- 2 years ago
Recent Discussions
- 19 hours ago
- 17 days ago