Skip to content

Commit 9aefbac

Browse files
authored
docs: fix pylon.md format
1 parent 6d80012 commit 9aefbac

File tree

1 file changed

+11
-11
lines changed
  • src/code/language-support/javascript /server

1 file changed

+11
-11
lines changed

src/code/language-support/javascript /server/pylon.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,38 +8,38 @@ github: getcronit/pylon
88
Example service:
99

1010
```typescript
11-
import { defineService } from "@getcronit/pylon";
11+
import { defineService } from "@getcronit/pylon"
1212

1313
class User {
14-
name: string;
15-
email: string;
14+
name: string
15+
email: string
1616
constructor(name: string, email: string) {
17-
this.name = name;
18-
this.email = email;
17+
this.name = name
18+
this.email = email
1919
}
2020
}
2121

2222
const users = [
2323
new User("Alice", "alice@example.com"),
2424
new User("Bob", "bob@example.com"),
2525
new User("Charlie", "charlie@example.com"),
26-
];
26+
]
2727

2828
export default defineService({
2929
Query: {
3030
users,
3131
user: (name: string) => {
32-
return users.find((user) => user.name === name);
32+
return users.find(user => user.name === name)
3333
},
3434
Mutation: {
3535
addUser: (name: string, email: string) => {
36-
const user = new User(name, email);
37-
users.push(user);
38-
return user;
36+
const user = new User(name, email)
37+
users.push(user)
38+
return user
3939
},
4040
},
4141
},
42-
});
42+
})
4343
```
4444

4545
After running the service, you can query it using GraphQL:

0 commit comments

Comments
 (0)