Last active
November 7, 2019 11:13
-
-
Save rizwan92/56fdb43d374e17b6c8c6cf9c457dcbd3 to your computer and use it in GitHub Desktop.
grphqlQueryandMutation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
User | |
query getUsers($page:Int,$limit:Int,$filter:Filter,$search:String){ | |
users(page:$page,limit:$limit,filter:$filter,search:$search){ | |
data{ | |
_id | |
} | |
count | |
page | |
limit | |
} | |
} | |
query userScript { | |
userscript(name:"script"){ | |
data{ | |
isVerified | |
} | |
count | |
page | |
limit | |
} | |
} | |
mutation updateOrganization($userId:String!,$organization:OrganizationDetails!,$user:UserDetails!){ | |
verifyUser(userId:$userId,organization:$organization,user:$user){ | |
data{ | |
_id | |
organization{ | |
websiteUrl | |
logo | |
name | |
countryId | |
stateId | |
} | |
traddler{ | |
namePrefix | |
name | |
mobile | |
designation | |
} | |
} | |
} | |
} | |
query getUser($userId :String!){ | |
user(userId:$userId){ | |
_id | |
TRNNumber | |
isEmailVerified | |
floatOfferStatus | |
organization{ | |
websiteUrl | |
logo | |
name | |
countryId | |
stateId | |
} | |
traddler{ | |
namePrefix | |
name | |
mobile | |
designation | |
} | |
} | |
} | |
query checkEmailToken($emailToken:String!){ | |
checkEmailToken(emailToken:$emailToken){ | |
data{ | |
_id | |
} | |
message | |
} | |
} | |
User variables | |
{ | |
"filter":{"from":"2019/01/01", "to":"2019/01/31","isEmailVerified":true}, | |
"search":"manish", | |
"emailToken":"c8dd66b1c519757ca411001576fcffa", | |
"limit":10, | |
"userId": "5db80113916312204e7cb237", | |
"organization": { | |
"websiteUrl": "www.msahu.com1", | |
"logo": "msahulogo", | |
"name": "msahu", | |
"countryId": "59c38dfc6039ce5e0803ab80", | |
"pincode": "492001", | |
"address": "my address is msahu", | |
"stateId": "59c3ae659eb71005e62e6b47" | |
}, | |
"user": { | |
"namePrefix":"MR", | |
"name":"msahu1", | |
"mobile":"9827866360", | |
"designation":"ceo" | |
} | |
} | |
================== | |
Countries | |
query getCountries($page:Int,$limit:Int,$filter:CountryFilter,$search:String){ | |
getCountries(page:$page,limit:$limit,filter:$filter,search:$search){ | |
data{ | |
_id | |
shortName | |
name | |
code | |
} | |
count | |
page | |
limit | |
} | |
} | |
query getCountry($countryId :String!){ | |
getCountry(countryId:$countryId){ | |
code | |
name | |
states{ | |
name | |
} | |
} | |
} | |
country variables | |
{ | |
"limit": 2, | |
"page": 1, | |
"countryId": "59c38dfc6039ce5e0803ab80", | |
"search": "india" | |
} | |
================================ | |
States | |
query getStates($page:Int,$limit:Int,$filter:StateFilter,$search:String){ | |
getStates(page:$page,limit:$limit,filter:$filter,search:$search){ | |
data{ | |
name | |
countryId | |
_id | |
} | |
count | |
page | |
limit | |
} | |
} | |
query getState($stateId :String!){ | |
getState(stateId:$stateId){ | |
name | |
} | |
} | |
states variables | |
{ | |
"search": "bihar", | |
"stateId": "59c38df6039ce5e0803ab29", | |
"limit": 2 | |
} | |
=========================== | |
CommodityCategory | |
query getCommodityCategories($page:Int,$limit:Int,$filter:CommodityCategoryFilter,$search:String){ | |
getCommodityCategories(page:$page,limit:$limit,filter:$filter,search:$search){ | |
data{ | |
name | |
_id | |
} | |
count | |
page | |
limit | |
} | |
} | |
query getCommodityCategory($commodityCategoryId:String){ | |
getCommodityCategory(commodityCategoryId:$commodityCategoryId){ | |
name | |
} | |
} | |
{ | |
"commodityCategoryId" :"59c4d87ccbac174b5f906d2a", | |
"page": 1, | |
"limit": 2, | |
"search": "Pulse" | |
} | |
===================================== | |
COMMODITY | |
query getCommodities($page:Int,$limit:Int,$filter:CommodityFilter,$search:String){ | |
getCommodities(page:$page,limit:$limit,filter:$filter,search:$search){ | |
data{ | |
name | |
_id | |
isEnable | |
} | |
count | |
limit | |
page | |
} | |
} | |
query getCommodity($commodityId:String){ | |
getCommodity(commodityId:$commodityId){ | |
name | |
} | |
} | |
COMODITY Variables | |
{ | |
"search": "", | |
"commodityId": "5c77d3d17a2bace4a9e1042c", | |
"limit": 10, | |
"page": 1, | |
"search": "Green" | |
} | |
=========================== | |
PORT | |
mutation addPort($name:String,$countryId:String){ | |
addPort(name:$name,countryId:$countryId){ | |
_id | |
name | |
} | |
} | |
query getPorts($page:Int,$limit:Int,$filter:PortFilter,$search:String){ | |
getPorts(page:$page,limit:$limit,filter:$filter,search:$search){ | |
data{ | |
_id | |
name | |
countryId | |
} | |
count | |
page | |
limit | |
} | |
} | |
PORT VARIABLES | |
{ | |
"search": "wow", | |
"name": "wow", | |
"countryId": "59c38dfc6039ce5e0803ab80", | |
"page": 1, | |
"limit": 2 | |
} | |
======================= | |
OFFER | |
query getOffers($page:Int,$limit:Int,$filter:OfferFilter,$search:String){ | |
offers(page:$page,limit:$limit,filter:$filter,search:$search){ | |
data{ | |
_id | |
userId | |
commodityId | |
countryId | |
tradeBase | |
quantity | |
quantityUnit | |
price | |
priceUnit | |
incoterm | |
port | |
mainSpecification | |
shipmentOrDelivery | |
shipmentOrDeliveryPeriod | |
packaging | |
paymentRequirement | |
furtherSpecification | |
otherSpecification | |
portOfDischarge | |
tradeMarketStatus | |
hasTradeBooked | |
image | |
offerBarredUsers | |
isEnable | |
currency | |
createdAt | |
updatedAt | |
user{ | |
} | |
country{ | |
name | |
} | |
commodity{ | |
name | |
} | |
} | |
count | |
page | |
limit | |
} | |
} | |
query getOffer($offerId:String){ | |
offer(offerId:$offerId){ | |
_id | |
userId | |
commodityId | |
countryId | |
tradeBase | |
quantity | |
quantityUnit | |
price | |
priceUnit | |
incoterm | |
port | |
mainSpecification | |
shipmentOrDelivery | |
shipmentOrDeliveryPeriod | |
packaging | |
paymentRequirement | |
furtherSpecification | |
otherSpecification | |
portOfDischarge | |
tradeMarketStatus | |
hasTradeBooked | |
image | |
offerBarredUsers | |
isEnable | |
currency | |
createdAt | |
updatedAt | |
user{ | |
} | |
country{ | |
name | |
} | |
commodity{ | |
name | |
} | |
} | |
} | |
mutation editOffer($offerId:String,$offer:EditOffer){ | |
editOffer(offerId:$offerId,offer:$offer){ | |
data{ | |
_id | |
userId | |
commodityId | |
countryId | |
tradeBase | |
quantity | |
quantityUnit | |
price | |
priceUnit | |
incoterm | |
port | |
mainSpecification | |
shipmentOrDelivery | |
shipmentOrDeliveryPeriod | |
packaging | |
paymentRequirement | |
furtherSpecification | |
otherSpecification | |
portOfDischarge | |
tradeMarketStatus | |
hasTradeBooked | |
image | |
offerBarredUsers | |
isEnable | |
currency | |
createdAt | |
updatedAt | |
user{ | |
} | |
country{ | |
name | |
} | |
commodity{ | |
name | |
} | |
} | |
} | |
} | |
mutation addOffer($offer:AddOffer){ | |
addOffer(offer:$offer){ | |
tradeBase | |
} | |
} | |
OFFFER VARIABLES | |
{ | |
"filter": { | |
"from":"2019/10/28" | |
}, | |
"search": "rizwan", | |
"limit": 10, | |
"offerId": "5db97161e7b01c5e6156fdce", | |
"offer": { | |
"quantity":2, | |
"quantityUnit":"Metric Tons", | |
"price":2000, | |
"priceUnit":"MT", | |
"incoterm":"FOB", | |
"port" :"5db7bcd9fc989d2d56624aab", | |
"mainSpecification":"mainSpecification12", | |
"shipmentOrDelivery":"shipment", | |
"furtherSpecification":"furtherSpecification", | |
"shipmentOrDeliveryPeriod":"shipmentOrDeliveryPeriodhai ye", | |
"packaging":"packaging", | |
"paymentRequirement":"paymentRequirement" | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment