Skip to content
This repository was archived by the owner on Aug 28, 2018. It is now read-only.

Commit 9ed9745

Browse files
author
Miodrag Seslija
authored
Merge pull request #2 from ninech/35080-token-authorisation
Make authorization in graphql, crud for circuit modul
2 parents 3fef752 + db1e41a commit 9ed9745

File tree

11 files changed

+769
-38
lines changed

11 files changed

+769
-38
lines changed

EXAMPLES.md

Lines changed: 358 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,358 @@
1+
### CircuitType
2+
3+
Get all
4+
```
5+
{
6+
circuitTypes {
7+
edges {
8+
node {
9+
id
10+
name
11+
slug
12+
}
13+
}
14+
}
15+
}
16+
```
17+
18+
Create
19+
```
20+
mutation {
21+
newCircuitType(input: {name: "Type", slug: "type"}) {
22+
circuitType {
23+
name
24+
slug
25+
}
26+
}
27+
}
28+
```
29+
30+
Update
31+
```
32+
mutation {
33+
updateCircuitType(input: {id:"Q2lyY3VpdFR5cGVOb2RlOjE2", name: "Type1", slug: "type1"}) {
34+
circuitType {
35+
id
36+
name
37+
slug
38+
}
39+
}
40+
}
41+
```
42+
43+
Delete
44+
```
45+
mutation {
46+
deleteCircuitType(input: {id: "Q2lyY3VpdFR5cGVOb2RlOjg="}) {
47+
circuitType {
48+
name
49+
slug
50+
}
51+
}
52+
}
53+
```
54+
55+
### Provider
56+
57+
Get all
58+
```
59+
{
60+
providers {
61+
edges {
62+
node {
63+
id
64+
slug
65+
name
66+
asn
67+
account
68+
portalUrl
69+
nocContact
70+
comments
71+
}
72+
}
73+
}
74+
}
75+
```
76+
77+
Create
78+
```
79+
mutation {
80+
newProvider(input: {name: "Provider123", slug: "provider123", asn: 256, account: "account", portalUrl: "http://github.com/", nocContact:"noc", comments: "my comment"}) {
81+
provider {
82+
id
83+
slug
84+
name
85+
asn
86+
account
87+
portalUrl
88+
nocContact
89+
comments
90+
}
91+
}
92+
}
93+
```
94+
95+
Update
96+
```
97+
mutation {
98+
updateProvider(input: {id:"UHJvdmlkZXJOb2RlOjY0", name: "Provider1", slug: "provider1231", asn: 512, account: "account", portalUrl: "http://github.com/", nocContact:"noc", comments: "my comment"}) {
99+
provider {
100+
id
101+
slug
102+
name
103+
asn
104+
account
105+
portalUrl
106+
nocContact
107+
comments
108+
}
109+
}
110+
}
111+
```
112+
113+
Delete
114+
```
115+
mutation {
116+
deleteProvider(input: {id:"UHJvdmlkZXJOb2RlOjY0"}) {
117+
provider {
118+
id
119+
slug
120+
name
121+
asn
122+
account
123+
portalUrl
124+
nocContact
125+
comments
126+
}
127+
}
128+
}
129+
```
130+
131+
132+
### Circuit
133+
134+
Get all
135+
```
136+
{
137+
circuits {
138+
edges {
139+
node {
140+
id
141+
cid
142+
provider {
143+
id
144+
name
145+
}
146+
type {
147+
id
148+
name
149+
}
150+
tenant {
151+
id
152+
name
153+
}
154+
installDate
155+
commitRate
156+
description
157+
}
158+
}
159+
}
160+
}
161+
```
162+
163+
Create
164+
```
165+
mutation {
166+
newCircuit(input: {cid: "cid", provider: "UHJvdmlkZXJOb2RlOjU4", type:"Q2lyY3VpdFR5cGVOb2RlOjMx", installDate:"2017-10-12", commitRate: 12, description:"desc", comments:"dsadsa" }) {
167+
circuit {
168+
id
169+
cid
170+
provider {
171+
id
172+
name
173+
}
174+
type {
175+
id
176+
name
177+
}
178+
installDate
179+
commitRate
180+
description
181+
comments
182+
}
183+
}
184+
}
185+
```
186+
187+
Update
188+
```
189+
mutation {
190+
updateCircuit(input: {id: "Q2lyY3VpdE5vZGU6NA==", cid: "ci3d", provider: "UHJvdmlkZXJOb2RlOjU4", type:"Q2lyY3VpdFR5cGVOb2RlOjQ=", installDate:"2017-11-12", commitRate: 12, description:"someting", comments:"dsadsa" }) {
191+
circuit {
192+
id
193+
cid
194+
provider {
195+
id
196+
name
197+
}
198+
type {
199+
id
200+
name
201+
}
202+
tenant {
203+
id
204+
name
205+
}
206+
installDate
207+
commitRate
208+
description
209+
comments
210+
}
211+
}
212+
}
213+
```
214+
215+
Delete
216+
```
217+
mutation {
218+
deleteCircuit(input: {id: "Q2lyY3VpdE5vZGU6Mg=="}) {
219+
circuit {
220+
id
221+
cid
222+
provider {
223+
id
224+
name
225+
}
226+
type {
227+
id
228+
name
229+
}
230+
tenant {
231+
id
232+
name
233+
}
234+
installDate
235+
commitRate
236+
description
237+
comments
238+
}
239+
}
240+
}
241+
```
242+
243+
### CircuitTermination
244+
245+
Get all
246+
```
247+
{
248+
circuitTerminations {
249+
edges {
250+
node {
251+
id
252+
termSide
253+
portSpeed
254+
ppInfo
255+
upstreamSpeed
256+
xconnectId
257+
interface {
258+
id
259+
name
260+
}
261+
site {
262+
id
263+
name
264+
}
265+
circuit {
266+
id
267+
cid
268+
}
269+
}
270+
}
271+
}
272+
}
273+
```
274+
275+
Create
276+
```
277+
mutation {
278+
newCircuitTermination(input: {circuit: "Q2lyY3VpdE5vZGU6MQ==", portSpeed:128, termSide:"A", upstreamSpeed:128, site:"U2l0ZU5vZGU6MQ==", interface:"SW50ZXJmYWNlTm9kZToz", ppInfo:"ppInfo",xconnectId:"xconnectId" }) {
279+
circuitTermination {
280+
id
281+
termSide
282+
portSpeed
283+
ppInfo
284+
upstreamSpeed
285+
xconnectId
286+
interface {
287+
id
288+
name
289+
}
290+
site {
291+
id
292+
name
293+
}
294+
circuit {
295+
id
296+
cid
297+
}
298+
}
299+
}
300+
}
301+
```
302+
303+
Update
304+
```
305+
mutation {
306+
updateCircuitTermination(input: {id: "Q2lyY3VpdFRlcm1pbmF0aW9uTm9kZTox", portSpeed:512, termSide:"Z", upstreamSpeed:512, ppInfo:"ppInfo123",xconnectId:"xconnectId123" }) {
307+
circuitTermination {
308+
id
309+
termSide
310+
portSpeed
311+
ppInfo
312+
upstreamSpeed
313+
xconnectId
314+
interface {
315+
id
316+
name
317+
}
318+
site {
319+
id
320+
name
321+
}
322+
circuit {
323+
id
324+
cid
325+
}
326+
}
327+
}
328+
}
329+
```
330+
331+
Delete
332+
```
333+
mutation {
334+
deleteCircuitTermination(input: {id: "Q2lyY3VpdFRlcm1pbmF0aW9uTm9kZTox" }) {
335+
circuitTermination {
336+
id
337+
termSide
338+
portSpeed
339+
ppInfo
340+
upstreamSpeed
341+
xconnectId
342+
interface {
343+
id
344+
name
345+
}
346+
site {
347+
id
348+
name
349+
}
350+
circuit {
351+
id
352+
cid
353+
}
354+
}
355+
}
356+
}
357+
```
358+

0 commit comments

Comments
 (0)