Skip to content

Commit 6fde16c

Browse files
author
Bojan Tomic
committed
Initial commit
0 parents  commit 6fde16c

28 files changed

Lines changed: 896 additions & 0 deletions

.DS_Store

6 KB
Binary file not shown.

pom.xml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<groupId>com.howtographql.sample</groupId>
5+
<artifactId>hackernews</artifactId>
6+
<packaging>war</packaging>
7+
<version>1.0-SNAPSHOT</version>
8+
<name>HowToGraphQL sample Hacker News clone</name>
9+
<url>http://www.howtographql.com</url>
10+
11+
<dependencies>
12+
<dependency>
13+
<groupId>com.graphql-java</groupId>
14+
<artifactId>graphql-java</artifactId>
15+
<version>3.0.0</version>
16+
</dependency>
17+
<dependency>
18+
<groupId>com.graphql-java</groupId>
19+
<artifactId>graphql-java-servlet</artifactId>
20+
<version>4.0.0</version>
21+
</dependency>
22+
<dependency>
23+
<groupId>javax.servlet</groupId>
24+
<artifactId>javax.servlet-api</artifactId>
25+
<version>3.0.1</version>
26+
<scope>provided</scope>
27+
</dependency>
28+
<dependency>
29+
<groupId>com.graphql-java</groupId>
30+
<artifactId>graphql-java-tools</artifactId>
31+
<version>3.1.2</version>
32+
</dependency>
33+
<dependency>
34+
<groupId>org.mongodb</groupId>
35+
<artifactId>mongodb-driver</artifactId>
36+
<version>3.4.2</version>
37+
</dependency>
38+
<dependency>
39+
<groupId>ch.qos.logback</groupId>
40+
<artifactId>logback-classic</artifactId>
41+
<version>1.2.3</version>
42+
</dependency>
43+
</dependencies>
44+
45+
<build>
46+
<finalName>hackernews</finalName>
47+
48+
<plugins>
49+
<plugin>
50+
<groupId>org.apache.maven.plugins</groupId>
51+
<artifactId>maven-compiler-plugin</artifactId>
52+
<version>3.5.1</version>
53+
<configuration>
54+
<source>1.8</source>
55+
<target>1.8</target>
56+
</configuration>
57+
</plugin>
58+
59+
<plugin>
60+
<artifactId>maven-war-plugin</artifactId>
61+
<version>3.1.0</version>
62+
</plugin>
63+
64+
<plugin>
65+
<groupId>org.eclipse.jetty</groupId>
66+
<artifactId>jetty-maven-plugin</artifactId>
67+
<version>9.4.6.v20170531</version>
68+
</plugin>
69+
</plugins>
70+
</build>
71+
</project>

src/.DS_Store

6 KB
Binary file not shown.

src/main/.DS_Store

6 KB
Binary file not shown.

src/main/java/.DS_Store

6 KB
Binary file not shown.

src/main/java/com/.DS_Store

6 KB
Binary file not shown.
6 KB
Binary file not shown.
6 KB
Binary file not shown.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package com.howtographql.hackernews;
2+
3+
import java.util.Optional;
4+
5+
import javax.servlet.http.HttpServletRequest;
6+
import javax.servlet.http.HttpServletResponse;
7+
8+
import graphql.servlet.GraphQLContext;
9+
10+
/**
11+
* Created by bojan.tomic on 7/3/17.
12+
*/
13+
public class AuthContext extends GraphQLContext {
14+
15+
private final User user;
16+
17+
public AuthContext(User user, Optional<HttpServletRequest> request, Optional<HttpServletResponse> response) {
18+
super(request, response);
19+
this.user = user;
20+
}
21+
22+
public User getUser() {
23+
return user;
24+
}
25+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
package com.howtographql.hackernews;
2+
3+
/**
4+
* Created by bojan.tomic on 7/2/17.
5+
*/
6+
public class AuthData {
7+
8+
private String email;
9+
private String password;
10+
11+
public AuthData() {
12+
}
13+
14+
public AuthData(String email, String password) {
15+
this.email = email;
16+
this.password = password;
17+
}
18+
19+
public String getEmail() {
20+
return email;
21+
}
22+
23+
public String getPassword() {
24+
return password;
25+
}
26+
27+
public void setEmail(String email) {
28+
this.email = email;
29+
}
30+
31+
public void setPassword(String password) {
32+
this.password = password;
33+
}
34+
}

0 commit comments

Comments
 (0)